当前位置: 首页>>代码示例>>PHP>>正文


PHP SugarBean::get_notification_recipients方法代码示例

本文整理汇总了PHP中SugarBean::get_notification_recipients方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarBean::get_notification_recipients方法的具体用法?PHP SugarBean::get_notification_recipients怎么用?PHP SugarBean::get_notification_recipients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SugarBean的用法示例。


在下文中一共展示了SugarBean::get_notification_recipients方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

	function get_notification_recipients() {
		if($this->special_notification) {
			return parent::get_notification_recipients();
		}

//		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true));
		$list = array();
        if(!is_array($this->contacts_arr)) {
			$this->contacts_arr =	array();
		}

		if(!is_array($this->users_arr)) {
			$this->users_arr =	array();
		}

        if(!is_array($this->leads_arr)) {
			$this->leads_arr =	array();
		}

		foreach($this->users_arr as $user_id) {
			$notify_user = new User();
			$notify_user->retrieve($user_id);
			$notify_user->new_assigned_user_name = $notify_user->full_name;
			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
			$list[$notify_user->id] = $notify_user;
		}

		foreach($this->contacts_arr as $contact_id) {
			$notify_user = new Contact();
			$notify_user->retrieve($contact_id);
			$notify_user->new_assigned_user_name = $notify_user->full_name;
			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
			$list[$notify_user->id] = $notify_user;
		}

        foreach($this->leads_arr as $lead_id) {
			$notify_user = new Lead();
			$notify_user->retrieve($lead_id);
			$notify_user->new_assigned_user_name = $notify_user->full_name;
			$GLOBALS['log']->info("Notifications: recipient is $notify_user->new_assigned_user_name");
			$list[$notify_user->id] = $notify_user;
		}
		global $sugar_config;
		if(isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
			global $current_user;
			if(isset($list[$current_user->id]))
				unset($list[$current_user->id]);
		}
//		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
		return $list;
	}
开发者ID:eggsurplus,项目名称:SuiteCRM,代码行数:51,代码来源:Call.php

示例2: get_notification_recipients

 protected function get_notification_recipients()
 {
     if ($this->special_notification) {
         return parent::get_notification_recipients();
     }
     $list = [];
     if (!is_array($this->contacts_arr)) {
         $this->contacts_arr = [];
     }
     if (!is_array($this->users_arr)) {
         $this->users_arr = [];
     }
     if (!is_array($this->leads_arr)) {
         $this->leads_arr = [];
     }
     foreach ($this->users_arr as $user_id) {
         $notify_user = new User();
         $notify_user->retrieve($user_id);
         $notify_user->new_assigned_user_name = $notify_user->full_name;
         Log::info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
         $list[$notify_user->id] = $notify_user;
     }
     foreach ($this->contacts_arr as $contact_id) {
         $notify_user = new Contact();
         $notify_user->retrieve($contact_id);
         $notify_user->new_assigned_user_name = $notify_user->full_name;
         Log::info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
         $list[$notify_user->id] = $notify_user;
     }
     foreach ($this->leads_arr as $lead_id) {
         $notify_user = new Lead();
         $notify_user->retrieve($lead_id);
         $notify_user->new_assigned_user_name = $notify_user->full_name;
         Log::info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
         $list[$notify_user->id] = $notify_user;
     }
     global $sugar_config;
     if (isset($sugar_config['disable_notify_current_user']) && $sugar_config['disable_notify_current_user']) {
         global $current_user;
         if (isset($list[$current_user->id])) {
             unset($list[$current_user->id]);
         }
     }
     return $list;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:45,代码来源:Meeting.php

示例3: array

 function get_notification_recipients()
 {
     if ($this->special_notification) {
         return parent::get_notification_recipients();
     }
     //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($this,true));
     $list = array();
     if (!is_array($this->contacts_arr)) {
         $this->contacts_arr = array();
     }
     if (empty($this->contacts_arr) && $this->load_relationship('contacts')) {
         $this->contacts_arr = $this->contacts->get();
     }
     if (!is_array($this->users_arr)) {
         $this->users_arr = array();
     }
     if (empty($this->users_arr) && $this->load_relationship('users')) {
         $this->users_arr = $this->users->get();
     }
     if (!is_array($this->leads_arr)) {
         $this->leads_arr = array();
     }
     if (empty($this->leads_arr) && $this->load_relationship('leads')) {
         $this->leads_arr = $this->leads->get();
     }
     foreach ($this->users_arr as $user_id) {
         $notify_user = BeanFactory::getBean('Users', $user_id);
         if (!empty($notify_user->id)) {
             $notify_user->new_assigned_user_name = $notify_user->full_name;
             $GLOBALS['log']->info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
             $list[$notify_user->id] = $notify_user;
         }
     }
     foreach ($this->contacts_arr as $contact_id) {
         $notify_user = BeanFactory::getBean('Contacts', $contact_id);
         if (!empty($notify_user->id) && !empty($notify_user->email1)) {
             $notify_user->new_assigned_user_name = $notify_user->full_name;
             $GLOBALS['log']->info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
             $list[$notify_user->id] = $notify_user;
         }
     }
     foreach ($this->leads_arr as $lead_id) {
         $notify_user = BeanFactory::getBean('Leads', $lead_id);
         if (!empty($notify_user->id)) {
             $notify_user->new_assigned_user_name = $notify_user->full_name;
             $GLOBALS['log']->info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
             $list[$notify_user->id] = $notify_user;
         }
     }
     //		$GLOBALS['log']->debug('Call.php->get_notification_recipients():'.print_r($list,true));
     return $list;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:52,代码来源:Call.php

示例4: array

 function get_notification_recipients()
 {
     if ($this->special_notification) {
         return parent::get_notification_recipients();
     }
     $list = array();
     if (!is_array($this->contacts_arr)) {
         $this->contacts_arr = array();
     }
     if (!is_array($this->users_arr)) {
         $this->users_arr = array();
     }
     if (!is_array($this->leads_arr)) {
         $this->leads_arr = array();
     }
     foreach ($this->users_arr as $user_id) {
         $notify_user = new User();
         $notify_user->retrieve($user_id);
         $notify_user->new_assigned_user_name = $notify_user->full_name;
         $GLOBALS['log']->info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
         $list[$notify_user->id] = $notify_user;
     }
     foreach ($this->contacts_arr as $contact_id) {
         $notify_user = new Contact();
         $notify_user->retrieve($contact_id);
         $notify_user->new_assigned_user_name = $notify_user->full_name;
         $GLOBALS['log']->info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
         $list[$notify_user->id] = $notify_user;
     }
     foreach ($this->leads_arr as $lead_id) {
         $notify_user = new Lead();
         $notify_user->retrieve($lead_id);
         $notify_user->new_assigned_user_name = $notify_user->full_name;
         $GLOBALS['log']->info("Notifications: recipient is {$notify_user->new_assigned_user_name}");
         $list[$notify_user->id] = $notify_user;
     }
     return $list;
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:38,代码来源:Meeting.php


注:本文中的SugarBean::get_notification_recipients方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。