本文整理匯總了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);
}