本文整理汇总了PHP中CRM_Core_Page_Basic类的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Page_Basic类的具体用法?PHP CRM_Core_Page_Basic怎么用?PHP CRM_Core_Page_Basic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CRM_Core_Page_Basic类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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();
}
示例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();
}
示例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));
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例12: run
/**
* Run the basic page (run essentially starts execution for that page).
*
* @return void
*/
function run()
{
$this->preProcess();
return parent::run();
}
示例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();
}
示例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();
}
示例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();
}