本文整理汇总了PHP中CRM_Core_BAO_Email::getValues方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_BAO_Email::getValues方法的具体用法?PHP CRM_Core_BAO_Email::getValues怎么用?PHP CRM_Core_BAO_Email::getValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_BAO_Email
的用法示例。
在下文中一共展示了CRM_Core_BAO_Email::getValues方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Run the page.
*
* This method is called after the page is created.
*/
public function run()
{
// get the emails for this contact
$contactId = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE, NULL, $_REQUEST);
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array('labelColumn' => 'display_name'));
$entityBlock = array('contact_id' => $contactId);
$emails = CRM_Core_BAO_Email::getValues($entityBlock);
if (!empty($emails)) {
foreach ($emails as $key => &$value) {
$value['location_type'] = $locationTypes[$value['location_type_id']];
}
}
$contact = new CRM_Contact_BAO_Contact();
$contact->id = $contactId;
$contact->find(TRUE);
$privacy = array();
foreach (CRM_Contact_BAO_Contact::$_commPrefs as $name) {
if (isset($contact->{$name})) {
$privacy[$name] = $contact->{$name};
}
}
$this->assign('contactId', $contactId);
$this->assign('email', $emails);
$this->assign('privacy', $privacy);
// check logged in user permission
CRM_Contact_Page_View::checkUserPermission($this, $contactId);
// finally call parent
parent::run();
}
示例2: getBlocks
/**
* simple helper function to dispatch getCall to lower comm blocks
*/
function getBlocks(&$params, &$values, &$ids, $blockCount = 0, &$parent)
{
$parent->address =& CRM_Core_BAO_Address::getValues($params, $values, $ids, $blockCount);
$parent->phone =& CRM_Core_BAO_Phone::getValues($params, $values, $ids, $blockCount);
$parent->email =& CRM_Core_BAO_Email::getValues($params, $values, $ids, $blockCount);
$parent->im =& CRM_Core_BAO_IM::getValues($params, $values, $ids, $blockCount);
}