本文整理汇总了PHP中Emails::active_by_type方法的典型用法代码示例。如果您正苦于以下问题:PHP Emails::active_by_type方法的具体用法?PHP Emails::active_by_type怎么用?PHP Emails::active_by_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Emails
的用法示例。
在下文中一共展示了Emails::active_by_type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _unset_other_preferred
/**
* unsets the preferred indicator on other emails owned by this user with the same
* email type
*/
private function _unset_other_preferred()
{
$emails = new Emails($this->pidm);
$emails->load();
$active = $emails->preferred($emails->active_by_type($this->emal_code));
foreach ($active as $email) {
if ($email->email_address != $this->email_address) {
$email->preferred_ind = 'N';
// we're removing the preferred indicator...the second false prevents
// the save method from overwriting this update in the event there is
// only one email of the given type in the table. If we are inserting
// a primary email, we need to make sure there aren't any other
// primary email addresses or the API insert will bomb.
$email->save(false, false);
}
//end if
}
//end foreach
}