本文整理汇总了PHP中CRM_Core_BAO_Note::getNotePrivacyHidden方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_Note::getNotePrivacyHidden方法的具体用法?PHP CRM_Core_BAO_Note::getNotePrivacyHidden怎么用?PHP CRM_Core_BAO_Note::getNotePrivacyHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_Note
的用法示例。
在下文中一共展示了CRM_Core_BAO_Note::getNotePrivacyHidden方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: preProcess
function preProcess()
{
$this->_entityTable = $this->get('entityTable');
$this->_entityId = $this->get('entityId');
$this->_id = $this->get('id');
$this->_parentId = CRM_Utils_Array::value('parentId', $_GET, 0);
if ($this->_parentId) {
$this->assign('parentId', $this->_parentId);
}
if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
}
$this->setPageTitle($this->_parentId ? ts('Comment') : ts('Note'));
}
示例2: preProcess
function preProcess()
{
$this->_entityTable = $this->get('entityTable');
$this->_entityId = $this->get('entityId');
$this->_id = $this->get('id');
$this->_parentId = CRM_Utils_Array::value('parentId', $_GET, 0);
if ($this->_parentId) {
$this->assign('parentId', $this->_parentId);
}
if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
}
// set title to "Note - "+Contact Name
$displayName = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $this->_entityId, 'display_name');
$pageTitle = 'Note - ' . $displayName;
$this->assign('pageTitle', $pageTitle);
}
示例3: preProcess
function preProcess()
{
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
}
$this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
$this->assign('contactId', $this->_contactId);
// check logged in url permission
CRM_Contact_Page_View::checkUserPermission($this);
// set page title
CRM_Contact_Page_View::setTitle($this->_contactId);
$displayName = CRM_Contact_BAO_Contact::displayName($this->_contactId);
CRM_Utils_System::setTitle(ts('Notes for') . ' ' . $displayName);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
$this->assign('action', $this->_action);
}
示例4: preProcess
function preProcess()
{
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
require_once 'CRM/Core/BAO/Note.php';
if ($this->_id && CRM_Core_BAO_Note::getNotePrivacyHidden($this->_id)) {
CRM_Core_Error::statusBounce(ts('You do not have access to this note.'));
}
$this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this, true);
$this->assign('contactId', $this->_contactId);
// check logged in url permission
require_once 'CRM/Contact/Page/View.php';
CRM_Contact_Page_View::checkUserPermission($this);
// set page title
CRM_Contact_Page_View::setTitle($this->_contactId);
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'browse');
$this->assign('action', $this->_action);
}