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


PHP Campaign::get_full_list方法代码示例

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


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

示例1: trim

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     if (empty($this->id)) {
         return;
     }
     global $locale, $app_list_strings, $current_user;
     // retrieve the account information and the information about the person the contact reports to.
     $query = "SELECT acc.id, acc.name, con_reports_to.first_name, con_reports_to.last_name\n\t\tfrom contacts\n\t\tleft join accounts_contacts a_c on a_c.contact_id = '" . $this->id . "' and a_c.deleted=0\n\t\tleft join accounts acc on a_c.account_id = acc.id and acc.deleted=0\n\t\tleft join contacts con_reports_to on con_reports_to.id = contacts.reports_to_id\n\t\twhere contacts.id = '" . $this->id . "'";
     // Bug 43196 - If a contact is related to multiple accounts, make sure we pull the one we are looking for
     // Bug 44730  was introduced due to this, fix is to simply clear any whitespaces around the account_id first
     $clean_account_id = trim($this->account_id);
     if (!empty($clean_account_id)) {
         $query .= " and acc.id = '{$this->account_id}'";
     }
     $query .= " ORDER BY a_c.date_modified DESC";
     $result = $this->db->query($query, true, " Error filling in additional detail fields: ");
     // Get the id and the name.
     $row = $this->db->fetchByAssoc($result);
     if ($row != null) {
         $this->account_name = $row['name'];
         $this->account_id = $row['id'];
         $this->report_to_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '', '', '', null, true);
     } else {
         $this->account_name = '';
         $this->account_id = '';
         $this->report_to_name = '';
     }
     $this->load_contacts_users_relationship();
     /** concating this here because newly created Contacts do not have a
      * 'name' attribute constructed to pass onto related items, such as Tasks
      * Notes, etc.
      */
     $this->name = $locale->getLocaleFormattedName($this->first_name, $this->last_name);
     if (!empty($this->contacts_users_id)) {
         $this->sync_contact = true;
     }
     if (!empty($this->portal_active) && $this->portal_active == 1) {
         $this->portal_active = true;
     }
     // Set campaign name if there is a campaign id
     if (!empty($this->campaign_id)) {
         $camp = new Campaign();
         $where = "campaigns.id='{$this->campaign_id}'";
         $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
         $this->campaign_name = $campaign_list[0]->name;
     }
 }
开发者ID:razorinc,项目名称:sugarcrm-example,代码行数:48,代码来源:Contact.php

示例2: Campaign

 function fill_in_additional_detail_fields()
 {
     //Fill in the assigned_user_name
     //if(!empty($this->status))
     //$this->status = translate('lead_status_dom', '', $this->status);
     parent::fill_in_additional_detail_fields();
     $this->_create_proper_name_field();
     $this->get_contact();
     $this->get_opportunity();
     $this->get_account();
     if (!empty($this->campaign_id)) {
         $camp = new Campaign();
         $where = "campaigns.id='{$this->campaign_id}'";
         $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
         if (!empty($campaign_list)) {
             $this->campaign_name = $campaign_list[0]->name;
         }
     }
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:19,代码来源:Lead.php

示例3: Campaign

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     //rrs bug: 28184 - instead of removing this code altogether just adding this check to ensure that if the parent_name
     //is empty then go ahead and fill it.
     if (empty($this->parent_name) && !empty($this->id)) {
         $query = "SELECT a1.name from accounts a1, accounts a2 where a1.id = a2.parent_id and a2.id = '{$this->id}' and a1.deleted=0";
         $result = $this->db->query($query, true, " Error filling in additional detail fields: ");
         // Get the id and the name.
         $row = $this->db->fetchByAssoc($result);
         if ($row != null) {
             $this->parent_name = $row['name'];
         } else {
             $this->parent_name = '';
         }
     }
     // Set campaign name if there is a campaign id
     if (!empty($this->campaign_id)) {
         $camp = new Campaign();
         $where = "campaigns.id='{$this->campaign_id}'";
         $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
         $this->campaign_name = $campaign_list[0]->name;
     }
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:24,代码来源:Account.php

示例4: Campaign

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     global $locale, $app_list_strings, $current_user;
     // retrieve the account information and the information about the person the contact reports to.
     $query = "SELECT acc.id, acc.name, con_reports_to.first_name, con_reports_to.last_name\n\t\tfrom contacts\n\t\tleft join accounts_contacts a_c on a_c.contact_id = '" . $this->id . "' and a_c.deleted=0\n\t\tleft join accounts acc on a_c.account_id = acc.id and acc.deleted=0\n\t\tleft join contacts con_reports_to on con_reports_to.id = contacts.reports_to_id\n\t\twhere contacts.id = '" . $this->id . "'";
     $result = $this->db->query($query, true, " Error filling in additional detail fields: ");
     // Get the id and the name.
     $row = $this->db->fetchByAssoc($result);
     if ($row != null) {
         $this->account_name = $row['name'];
         $this->account_id = $row['id'];
         $this->report_to_name = $row['first_name'] . ' ' . $row['last_name'];
     } else {
         $this->account_name = '';
         $this->account_id = '';
         $this->report_to_name = '';
     }
     $this->load_contacts_users_relationship();
     /** concating this here because newly created Contacts do not have a
      * 'name' attribute constructed to pass onto related items, such as Tasks
      * Notes, etc.
      */
     $this->name = $locale->getLocaleFormattedName($this->first_name, $this->last_name);
     if (!empty($this->contacts_users_id)) {
         $this->sync_contact = true;
     }
     if (!empty($this->portal_active) && $this->portal_active == 1) {
         $this->portal_active = true;
     }
     // Set campaign name if there is a campaign id
     if (!empty($this->campaign_id)) {
         $camp = new Campaign();
         $where = "campaigns.id='{$this->campaign_id}'";
         $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
         $this->campaign_name = $campaign_list[0]->name;
     }
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:38,代码来源:Contact.php


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