本文整理汇总了PHP中CRM_Utils_System::appendBreadCrumb方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_System::appendBreadCrumb方法的具体用法?PHP CRM_Utils_System::appendBreadCrumb怎么用?PHP CRM_Utils_System::appendBreadCrumb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_System
的用法示例。
在下文中一共展示了CRM_Utils_System::appendBreadCrumb方法的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.
*/
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::ADD | CRM_Core_Action::DELETE)) {
$this->edit($action, $id);
}
if ($action & CRM_Core_Action::UPDATE) {
$this->edit($action, $id);
if (isset($id)) {
$aclName = CRM_Core_DAO::getFieldValue('CRM_ACL_DAO_ACL', $id);
CRM_Utils_System::setTitle(ts('Edit ACL - %1', array(1 => $aclName)));
}
}
// finally browse the acl's
if ($action & CRM_Core_Action::BROWSE) {
$this->browse();
}
// parent run
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.
*/
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);
CRM_Utils_System::setTitle(ts('Assign Users to Roles'));
// what action to take ?
if ($action & (CRM_Core_Action::UPDATE | CRM_Core_Action::ADD | CRM_Core_Action::DELETE)) {
$this->edit($action, $id);
}
// reset cache if enabled/disabled
if ($action & (CRM_Core_Action::DISABLE | CRM_Core_Action::ENABLE)) {
CRM_ACL_BAO_Cache::resetCache();
}
// finally browse the acl's
if ($action & CRM_Core_Action::BROWSE) {
}
// parent run
return parent::run();
}
示例3: preProcess
public function preProcess()
{
require_once 'CRM/Contact/BAO/SearchCustom.php';
$csID = CRM_Utils_Request::retrieve('csid', 'Integer', $this);
$ssID = CRM_Utils_Request::retrieve('ssID', 'Integer', $this);
$gID = CRM_Utils_Request::retrieve('gid', 'Integer', $this);
list($this->_customSearchID, $this->_customSearchClass, $formValues) = CRM_Contact_BAO_SearchCustom::details($csID, $ssID, $gID);
if (!$this->_customSearchID) {
CRM_Core_Error::fatal('Could not get details for custom search.');
}
if (!empty($formValues)) {
$this->_formValues = $formValues;
}
// set breadcrumb to return to Custom Search listings page
$breadCrumb = array(array('title' => ts('Custom Searches'), 'url' => CRM_Utils_System::url('civicrm/contact/search/custom/list', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
// use the custom selector
require_once 'CRM/Contact/Selector/Custom.php';
$this->_selectorName = 'CRM_Contact_Selector_Custom';
$this->set('customSearchID', $this->_customSearchID);
$this->set('customSearchClass', $this->_customSearchClass);
parent::preProcess();
// instantiate the new class
eval('$this->_customClass = new ' . $this->_customSearchClass . '( $this->_formValues );');
}
示例4: preProcess
public function preProcess()
{
$this->set('searchFormName', 'Custom');
$this->set('context', 'custom');
$csID = CRM_Utils_Request::retrieve('csid', 'Integer', $this);
$ssID = CRM_Utils_Request::retrieve('ssID', 'Integer', $this);
$gID = CRM_Utils_Request::retrieve('gid', 'Integer', $this);
list($this->_customSearchID, $this->_customSearchClass, $formValues) = CRM_Contact_BAO_SearchCustom::details($csID, $ssID, $gID);
if (!$this->_customSearchID) {
CRM_Core_Error::fatal('Could not get details for custom search.');
}
// stash this as a hidden element so we can potentially go there if the session
// is reset but this is available in the POST
$this->addElement('hidden', 'csid', $csID);
if (!empty($formValues)) {
$this->_formValues = $formValues;
}
// set breadcrumb to return to Custom Search listings page
$breadCrumb = array(array('title' => ts('Custom Searches'), 'url' => CRM_Utils_System::url('civicrm/contact/search/custom/list', 'reset=1')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
// use the custom selector
self::$_selectorName = 'CRM_Contact_Selector_Custom';
$this->set('customSearchID', $this->_customSearchID);
$this->set('customSearchClass', $this->_customSearchClass);
parent::preProcess();
// instantiate the new class
$this->_customClass = new $this->_customSearchClass($this->_formValues);
// CRM-12747
if (isset($this->_customClass->_permissionedComponent) && !self::isPermissioned($this->_customClass->_permissionedComponent)) {
CRM_Utils_System::permissionDenied();
}
}
示例5: __construct
function __construct()
{
// don’t display the ‘Add these Contacts to Group’ button
$this->_add2groupSupported = FALSE;
$dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
$this->db = $dsn['database'];
$this->log_conn_id = CRM_Utils_Request::retrieve('log_conn_id', 'Integer', CRM_Core_DAO::$_nullObject);
$this->log_date = CRM_Utils_Request::retrieve('log_date', 'String', CRM_Core_DAO::$_nullObject);
$this->cid = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject);
$this->raw = CRM_Utils_Request::retrieve('raw', 'Boolean', CRM_Core_DAO::$_nullObject);
parent::__construct();
CRM_Utils_System::resetBreadCrumb();
$breadcrumb = array(array('title' => ts('Home'), 'url' => CRM_Utils_System::url()), array('title' => ts('CiviCRM'), 'url' => CRM_Utils_System::url('civicrm', 'reset=1')), array('title' => ts('View Contact'), 'url' => CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$this->cid}")), array('title' => ts('Search Results'), 'url' => CRM_Utils_System::url('civicrm/contact/search', "force=1")));
CRM_Utils_System::appendBreadCrumb($breadcrumb);
if (CRM_Utils_Request::retrieve('revert', 'Boolean', CRM_Core_DAO::$_nullObject)) {
$reverter = new CRM_Logging_Reverter($this->log_conn_id, $this->log_date);
$reverter->revert($this->tables);
CRM_Core_Session::setStatus(ts('The changes have been reverted.'));
if ($this->cid) {
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/contact/view', "reset=1&selectedChild=log&cid={$this->cid}", FALSE, NULL, FALSE));
} else {
CRM_Utils_System::redirect(CRM_Report_Utils_Report::getNextUrl($this->summary, 'reset=1', FALSE, TRUE));
}
}
// make sure the report works even without the params
if (!$this->log_conn_id or !$this->log_date) {
$dao = new CRM_Core_DAO();
$dao->query("SELECT log_conn_id, log_date FROM `{$this->db}`.log_{$this->tables[0]} WHERE log_action = 'Update' ORDER BY log_date DESC LIMIT 1");
$dao->fetch();
$this->log_conn_id = $dao->log_conn_id;
$this->log_date = $dao->log_date;
}
$this->_columnHeaders = array('field' => array('title' => ts('Field')), 'from' => array('title' => ts('Changed From')), 'to' => array('title' => ts('Changed To')));
}
示例6: preProcess
public function preProcess()
{
parent::preProcess();
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
$this->assign('context', $this->_context);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this);
if ($this->_action & CRM_Core_Action::UPDATE) {
CRM_Utils_System::setTitle(ts('Configure Survey') . ' - ' . $this->_surveyTitle);
}
// when custom data is included in this page
if (!empty($_POST['hidden_custom'])) {
CRM_Custom_Form_CustomData::preProcess($this);
CRM_Custom_Form_CustomData::buildQuickForm($this);
}
if ($this->_name != 'Petition') {
$url = CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey');
CRM_Utils_System::appendBreadCrumb(array(array('title' => ts('Survey Dashboard'), 'url' => $url)));
}
$this->_values = $this->get('values');
if (!is_array($this->_values)) {
$this->_values = array();
if ($this->_surveyId) {
$params = array('id' => $this->_surveyId);
CRM_Campaign_BAO_Survey::retrieve($params, $this->_values);
}
$this->set('values', $this->_values);
}
$this->assign('action', $this->_action);
$this->assign('surveyId', $this->_surveyId);
// for custom data
$this->assign('entityID', $this->_surveyId);
}
示例7: preProcess
/**
* Build all the data structures needed to build the form.
*
* @return void
*/
public function preProcess()
{
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
if ($id) {
$this->_contributionIds = array($id);
$this->_componentClause = " civicrm_contribution.id IN ( {$id} ) ";
$this->_single = TRUE;
$this->assign('totalSelectedContributions', 1);
} else {
parent::preProcess();
}
// check that all the contribution ids have pending status
$query = "\nSELECT count(*)\nFROM civicrm_contribution\nWHERE contribution_status_id != 1\nAND {$this->_componentClause}";
$count = CRM_Core_DAO::singleValueQuery($query);
if ($count != 0) {
CRM_Core_Error::statusBounce("Please select only online contributions with Completed status.");
}
// we have all the contribution ids, so now we get the contact ids
parent::setContactIDs();
$this->assign('single', $this->_single);
$qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
$urlParams = 'force=1';
if (CRM_Utils_Rule::qfKey($qfKey)) {
$urlParams .= "&qfKey={$qfKey}";
}
$url = CRM_Utils_System::url('civicrm/contribute/search', $urlParams);
$breadCrumb = array(array('url' => $url, 'title' => ts('Search Results')));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
CRM_Utils_System::setTitle(ts('Print Contribution Receipts'));
}
示例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.
*
* @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();
}
示例9: preProcess
function preProcess()
{
$this->_soInstance = CRM_Utils_Array::value('instance', $_GET);
$this->assign('soInstance', $this->_soInstance);
$breadCrumbUrl = CRM_Utils_System::url('civicrm/admin/options/wordreplacements', "reset=1");
$breadCrumb = array(array('title' => ts('Word Replacements'), 'url' => $breadCrumbUrl));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
示例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()
{
// 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();
}
示例11: preProcess
function preProcess()
{
$this->_soInstance = CRM_Utils_Array::value('instance', $_GET);
$this->assign('soInstance', $this->_soInstance);
$breadCrumbUrl = CRM_Utils_System::url('civicrm/participant/config', "reset=1");
$breadCrumb = array(array('title' => ts('Max Participants Setting '), 'url' => $breadCrumbUrl));
$this->_getreturn = CRM_Core_BAO_Setting::getItem(self::EVENT_SETTING_GROUP, 'max_participants', NULL, FALSE);
CRM_Utils_System::appendBreadCrumb($breadCrumb);
}
示例12: preProcess
function preProcess()
{
CRM_Utils_System::setTitle(ts('Domain Information'));
$breadCrumbPath = CRM_Utils_System::url('civicrm/admin', 'reset=1');
CRM_Utils_System::appendBreadCrumb(ts('Administer CiviCRM'), $breadCrumbPath);
$this->_id = CRM_Core_Config::domainID();
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'view');
//location blocks.
CRM_Contact_Form_Location::preProcess($this);
}
示例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.
*/
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();
}
示例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.
*/
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();
}
示例15: preProcess
function preProcess()
{
CRM_Utils_System::setTitle(ts('Organization Address and Contact Info'));
$breadCrumbPath = CRM_Utils_System::url('civicrm/admin', 'reset=1');
CRM_Utils_System::appendBreadCrumb(ts('Administer CiviCRM'), $breadCrumbPath);
$session = CRM_Core_Session::singleton();
$session->replaceUserContext(CRM_Utils_System::url('civicrm/admin', 'reset=1'));
$this->_id = CRM_Core_Config::domainID();
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'view');
//location blocks.
$location = new CRM_Contact_Form_Location();
$location->preProcess($this);
}