本文整理汇总了PHP中CRM_Utils_System::resetBreadCrumb方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Utils_System::resetBreadCrumb方法的具体用法?PHP CRM_Utils_System::resetBreadCrumb怎么用?PHP CRM_Utils_System::resetBreadCrumb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Utils_System
的用法示例。
在下文中一共展示了CRM_Utils_System::resetBreadCrumb方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __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')));
}
示例2: __construct
/**
* Class constructor.
*/
public function __construct()
{
$this->storeDB();
$this->parsePropertiesFromUrl();
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')) {
$this->revert();
}
$this->_columnHeaders = array('field' => array('title' => ts('Field')), 'from' => array('title' => ts('Changed From')), 'to' => array('title' => ts('Changed To')));
}