本文整理汇总了PHP中CRM_Core_Page_Basic类的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Page_Basic类的具体用法?PHP CRM_Core_Page_Basic怎么用?PHP CRM_Core_Page_Basic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CRM_Core_Page_Basic类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
function run()
{
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Payment Processor'));
$breadCrumb = array(array('title' => ts('Global Settings'), 'url' => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
return parent::run();
}
开发者ID:ksecor,项目名称:civicrm,代码行数:19,代码来源:PaymentProcessor.php
示例2: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
function run()
{
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs Log'));
$breadCrumb = array(array('title' => ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
return parent::run();
}
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:19,代码来源:JobLog.php
示例3: run
function run()
{
$this->_mailing_id = CRM_Utils_Request::retrieve('mid', $this);
require_once 'CRM/Mailing/BAO/Mailing.php';
$report =& CRM_Mailing_BAO_Mailing::report($this->_mailing_id);
$this->assign('report', $report);
CRM_Utils_System::setTitle(ts('CiviMail Report: %1', array(1 => $report['mailing']['name'])));
parent::run();
}
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:9,代码来源:Report.php
示例4: __construct
/**
* Class constructor.
*
* @param string $title
* Title of the page.
* @param int $mode
* Mode of the page.
*
*/
public function __construct($title = NULL, $mode = NULL)
{
parent::__construct($title, $mode);
$this->account_id = CRM_Utils_Request::retrieve('account_id', 'Integer', CRM_Core_DAO::$_nullObject, true);
$this->assign('account_id', $this->account_id);
$this->assign('civicrm_fields', CRM_Myemma_Utils::buildCiviCRMFieldList());
$this->assign('location_types', CRM_Myemma_Utils::locationTypes());
$this->assign('my_emma_fields', CRM_Myemma_Utils::buildMyEmmaFieldList($this->account_id));
}
开发者ID:CiviCooP,项目名称:org.civicoop.myemma,代码行数:18,代码来源:MyEmmaFieldMap.php
示例5: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*/
public function run()
{
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - SMS Provider'));
$breadCrumb = array(array('title' => ts('SMS Provider'), 'url' => CRM_Utils_System::url('civicrm/admin/sms/provider', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
$this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE, 0);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0);
return parent::run();
}
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:17,代码来源:Provider.php
示例6: run
function run()
{
$action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 0);
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, 0);
if (!$action) {
$this->browse();
}
parent::run();
}
开发者ID:bhirsch,项目名称:voipdev,代码行数:10,代码来源:ContactType.php
示例7: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
*/
public function run()
{
CRM_Utils_System::setTitle(ts('Query Runner'));
$this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE, 0);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0);
if ($this->_action == 'export') {
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/query-runner', 'reset=1'));
}
return parent::run();
}
开发者ID:imba-us,项目名称:com.imba.queryrunner,代码行数:20,代码来源:QueryRunner.php
示例8: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*/
public function run()
{
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Payment Processor'));
//CRM-15546
$paymentProcessorTypes = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_PaymentProcessor', 'payment_processor_type_id', array('labelColumn' => 'name', 'flip' => 1));
$this->assign('defaultPaymentProcessorType', $paymentProcessorTypes['PayPal']);
$breadCrumb = array(array('title' => ts('Administration'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
return parent::run();
}
开发者ID:nielosz,项目名称:civicrm-core,代码行数:18,代码来源:PaymentProcessor.php
示例9: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*/
public function run()
{
// set title and breadcrumb
CRM_Utils_System::setTitle(ts('Settings - Scheduled Jobs'));
$breadCrumb = array(array('title' => ts('Scheduled Jobs'), 'url' => CRM_Utils_System::url('civicrm/admin', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
$this->_id = CRM_Utils_Request::retrieve('id', 'String', $this, FALSE, 0);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0);
if ($this->_action == 'export') {
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url('civicrm/admin/job', 'reset=1'));
}
return parent::run();
}
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:21,代码来源:Job.php
示例10: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
function run()
{
CRM_Utils_System::setTitle(ts('Appraisal Criteria'));
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse');
// default to 'browse'
// assign vars to templates
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false, 0);
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) {
$this->edit($action, $id);
}
// parent run
return parent::run();
}
开发者ID:JoeMurray,项目名称:civihr,代码行数:27,代码来源:AppraisalCriteria.php
示例11: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the type
* of action and executes that action. Finally it calls the parent's run
* method.
*/
public function run()
{
// get the requested action, default to 'browse'
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
// assign vars to templates
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
$context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE);
if ($context == 'nonDupe') {
CRM_Core_Session::setStatus(ts('Selected contacts have been marked as not duplicates'), ts('Changes Saved'), 'success');
}
// assign permissions vars to template
$this->assign('hasperm_administer_dedupe_rules', CRM_Core_Permission::check('administer dedupe rules'));
$this->assign('hasperm_merge_duplicate_contacts', CRM_Core_Permission::check('merge duplicate contacts'));
// which action to take?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD)) {
$this->edit($action, $id);
}
if ($action & CRM_Core_Action::DELETE) {
$this->delete($id);
}
// browse the rules
$this->browse();
// parent run
return parent::run();
}
开发者ID:nielosz,项目名称:civicrm-core,代码行数:33,代码来源:DedupeRules.php
示例12: run
/**
* Run the basic page (run essentially starts execution for that page).
*
* @return void
*/
function run()
{
$this->preProcess();
return parent::run();
}
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:10,代码来源:SurveyType.php
示例13: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
*/
public function run()
{
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
// assign vars to templates
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::PREVIEW)) {
$this->edit($action, $id, TRUE);
}
// finally browse the custom groups
$this->browse();
// parent run
return parent::run();
}
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:25,代码来源:ManagePremiums.php
示例14: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @param
* @return void
* @access public
*/
function run()
{
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse');
if ($action & CRM_Core_Action::REVERT) {
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false);
CRM_Contribute_BAO_PCP::setIsActive($id, 0);
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'));
} elseif ($action & CRM_Core_Action::RENEW) {
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false);
CRM_Contribute_BAO_PCP::setIsActive($id, 1);
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1'));
} elseif ($action & CRM_Core_Action::DELETE) {
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, false);
$session = CRM_Core_Session::singleton();
$session->pushUserContext(CRM_Utils_System::url(CRM_Utils_System::currentPath(), 'reset=1&action=browse'));
$controller = new CRM_Core_Controller_Simple('CRM_Contribute_Form_PCP_PCP', 'Personal Campaign Page', CRM_Core_Action::DELETE);
//$this->setContext( $id, $action );
$controller->set('id', $id);
$controller->process();
return $controller->run();
}
// finally browse
$this->browse();
// parent run
parent::run();
}
开发者ID:hampelm,项目名称:Ginsberg-CiviDemo,代码行数:40,代码来源:PCP.php
示例15: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*/
public function run()
{
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
// assign vars to templates
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
$this->assign('id', $id);
$this->edit($action, $id, FALSE, FALSE);
// this is special case where we need to call browse to list premium
if ($action == CRM_Core_Action::UPDATE) {
$this->browse();
}
// parent run
return parent::run();
}
开发者ID:hyebahi,项目名称:civicrm-core,代码行数:23,代码来源:Premium.php
示例16: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
*/
public function run()
{
// get the requested action
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
// assign vars to templates
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
// set breadcrumb to append to admin/access
$breadCrumb = array(array('title' => ts('Access Control'), 'url' => CRM_Utils_System::url('civicrm/admin/access', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::DELETE)) {
$this->edit($action, $id);
}
// finally browse the acl's
$this->browse();
// parent run
return parent::run();
}
开发者ID:BorislavZlatanov,项目名称:civicrm-core,代码行数:28,代码来源:ACLBasic.php
示例17: run
/**
* Browse all rule groups.
*/
public function run()
{
$gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0);
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 0);
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
$session = CRM_Core_Session::singleton();
$contactIds = $session->get('selectedSearchContactIds');
if ($context == 'search' || !empty($contactIds)) {
$context = 'search';
$this->assign('backURL', $session->readUserContext());
}
if ($action & CRM_Core_Action::RENEW) {
// empty cache
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0);
if ($rgid) {
$contactType = CRM_Core_DAO::getFieldValue('CRM_Dedupe_DAO_RuleGroup', $rgid, 'contact_type');
$cacheKeyString = "merge {$contactType}";
$cacheKeyString .= $rgid ? "_{$rgid}" : '_0';
$cacheKeyString .= $gid ? "_{$gid}" : '_0';
CRM_Core_BAO_PrevNextCache::deleteItem(NULL, $cacheKeyString);
}
$urlQry = "reset=1&action=update&rgid={$rgid}";
if ($gid) {
$urlQry .= "&gid={$gid}";
}
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry));
} elseif ($action & CRM_Core_Action::MAP) {
// do a batch merge if requested
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0);
$result = CRM_Dedupe_Merger::batchMerge($rgid, $gid, 'safe', TRUE, 75);
$skippedCount = CRM_Utils_Request::retrieve('skipped', 'Positive', $this, FALSE, 0);
$skippedCount = $skippedCount + count($result['skipped']);
$mergedCount = CRM_Utils_Request::retrieve('merged', 'Positive', $this, FALSE, 0);
$mergedCount = $mergedCount + count($result['merged']);
if (empty($result['merged']) && empty($result['skipped'])) {
$message = '';
if ($mergedCount >= 1) {
$message = ts("%1 pairs of duplicates were merged", array(1 => $mergedCount));
}
if ($skippedCount >= 1) {
$message = $message ? "{$message} and " : '';
$message .= ts("%1 pairs of duplicates were skipped due to conflict", array(1 => $skippedCount));
}
$message .= ts(" during the batch merge process with safe mode.");
CRM_Core_Session::setStatus($message, ts('Merge Complete'), 'success');
$urlQry = "reset=1&action=update&rgid={$rgid}";
if ($gid) {
$urlQry .= "&gid={$gid}";
}
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry));
} else {
$urlQry = "reset=1&action=map&rgid={$rgid}";
if ($gid) {
$urlQry .= "&gid={$gid}";
}
$urlQry .= "&skipped={$skippedCount}&merged={$mergedCount}";
CRM_Utils_System::jsRedirect(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlQry), ts('Batch Merge Task in progress'), ts('The batch merge task is still in progress. This page will be refreshed automatically.'));
}
}
if ($action & CRM_Core_Action::UPDATE || $action & CRM_Core_Action::BROWSE) {
$cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, FALSE, 0);
$rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0);
$this->action = CRM_Core_Action::UPDATE;
//calculate the $contactType
if ($rgid) {
$contactType = CRM_Core_DAO::getFieldValue('CRM_Dedupe_DAO_RuleGroup', $rgid, 'contact_type');
}
$sourceParams = 'snippet=4';
if ($gid) {
$sourceParams .= "&gid={$gid}";
}
if ($rgid) {
$sourceParams .= "&rgid={$rgid}";
}
if ($context == 'conflicts') {
$sourceParams .= "&selected=1";
}
$this->assign('sourceUrl', CRM_Utils_System::url('civicrm/ajax/dedupefind', $sourceParams, FALSE, NULL, FALSE));
//reload from cache table
$cacheKeyString = "merge {$contactType}";
$cacheKeyString .= $rgid ? "_{$rgid}" : '_0';
$cacheKeyString .= $gid ? "_{$gid}" : '_0';
$stats = CRM_Dedupe_Merger::getMergeStatsMsg($cacheKeyString);
if ($stats) {
CRM_Core_Session::setStatus($stats);
// reset so we not displaying same message again
CRM_Dedupe_Merger::resetMergeStats($cacheKeyString);
}
$join = "LEFT JOIN civicrm_dedupe_exception de ON ( pn.entity_id1 = de.contact_id1 AND\n pn.entity_id2 = de.contact_id2 )";
$where = "de.id IS NULL";
if ($context == 'conflicts') {
$where .= " AND pn.is_selected = 1";
}
$this->_mainContacts = CRM_Core_BAO_PrevNextCache::retrieve($cacheKeyString, $join, $where);
if (empty($this->_mainContacts)) {
if ($context == 'conflicts') {
// if the current screen was intended to list only selected contacts, move back to full dupe list
//.........这里部分代码省略.........
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:101,代码来源:DedupeFind.php
示例18: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
function run()
{
$this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0);
$this->assign('gid', $this->_gid);
if ($this->_gid) {
//get optionGroup name in case of email/postal greeting or addressee, CRM-4575
$this->_gName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'name');
$groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup', $this->_gid, 'title', 'id');
// Some option groups do not have a title set
if (!$groupTitle) {
$groupTitle = $this->_gName;
}
CRM_Utils_System::setTitle(ts('%1 - Option Values', array(1 => $groupTitle)));
}
$breadCrumb = array(array('title' => ts('Option Groups'), 'url' => CRM_Utils_System::url('civicrm/admin/options', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
return parent::run();
}
开发者ID:peteainsworth,项目名称:civicrm-4.2.9-drupal,代码行数:29,代码来源:OptionValue.php
示例19: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*/
public function run()
{
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
$this->set("context", $context);
// assign vars to templates
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
$action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
// default to 'browse'
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::CLOSE | CRM_Core_Action::REOPEN | CRM_Core_Action::EXPORT)) {
$this->edit($action, $id);
}
// parent run
return parent::run();
}
开发者ID:FundingWorks,项目名称:civicrm-core,代码行数:22,代码来源:FinancialBatch.php
示例20: run
/**
* Run the page.
*
* This method is called after the page is created. It checks for the
* type of action and executes that action.
* Finally it calls the parent's run method.
*
* @return void
* @access public
*
*/
function run()
{
// get the requested action
$action = CRM_Utils_Request::retrieve('action', $this, false, 'browse');
// default to 'browse'
// assign vars to templates
$this->assign('action', $action);
$id = CRM_Utils_Request::retrieve('id', $this, false, 0);
// what action to take ?
if ($action & (CRM_CORE_ACTION_UPDATE | CRM_CORE_ACTION_ADD | CRM_CORE_ACTION_PREVIEW)) {
$this->edit($action, $id, true);
}
// finally browse the custom groups
$this->browse();
// parent run
parent::run();
}
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:28,代码来源:ManagePremiums.php
注:本文中的CRM_Core_Page_Basic类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论