本文整理汇总了PHP中Contacts::getOwner方法的典型用法代码示例。如果您正苦于以下问题:PHP Contacts::getOwner方法的具体用法?PHP Contacts::getOwner怎么用?PHP Contacts::getOwner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contacts
的用法示例。
在下文中一共展示了Contacts::getOwner方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: notify
/** Provide a notification for an object
*/
protected function notify($objecttype, $broadperiod, $institution, $createdBy, $data)
{
if ($institution === 'PUBLIC') {
$users = new Users();
$responsible = $users->fetchRow('id = ' . $createdBy);
$to = array(array('email' => $responsible->email, 'name' => $responsible->fullname));
} elseif (in_array($institution, array('PAS', 'DCMS', 'RAH', 'BM'))) {
$to = array(array('email' => 'info@finds.org.uk', 'name' => 'Central Unit'));
} else {
$responsible = new Contacts();
$to = $responsible->getOwner($data['comment_findID']);
if (empty($to)) {
$to = array(array('email' => 'info@finds.org.uk', 'name' => 'Central Unit'));
}
}
$cc = $this->_getAdviser($objecttype, $broadperiod);
if ($this->_user) {
$from = array(array('email' => $this->_user->email, 'name' => $this->_user->fullname));
} else {
$from = array(array('email' => $data['comment_author_email'], 'name' => $data['comment_author']));
}
$assignData = array_merge($to['0'], $data);
$this->_helper->mailer($assignData, 'errorSubmission', $to, $cc, $from);
}
示例2: getContacts
/** Get the contact responsible
* @access public
* @return array
*/
public function getContacts()
{
$contacts = new Contacts();
return $contacts->getOwner($this->getFindID());
}