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


PHP Person::fill_in_additional_detail_fields方法代码示例

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


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

示例1: stripslashes

 function fill_in_additional_detail_fields()
 {
     // jmorais@dri Bug #56269
     parent::fill_in_additional_detail_fields();
     // ~jmorais@dri
     global $locale;
     $query = "SELECT u1.first_name, u1.last_name from users  u1, users  u2 where u1.id = u2.reports_to_id AND u2.id = '{$this->id}' and u1.deleted=0";
     $result = $this->db->query($query, true, "Error filling in additional detail fields");
     $row = $this->db->fetchByAssoc($result);
     if ($row != null) {
         $this->reports_to_name = stripslashes($row['first_name'] . ' ' . $row['last_name']);
     } else {
         $this->reports_to_name = '';
     }
     $this->_create_proper_name_field();
 }
开发者ID:omusico,项目名称:windcrm,代码行数:16,代码来源:User.php

示例2:

 function fill_in_additional_detail_fields()
 {
     global $locale;
     $query = "SELECT u1.first_name, u1.last_name from users u1, users u2 where u1.id = u2.reports_to_id AND u2.id = '{$this->id}' and u1.deleted=0";
     $result = $this->db->query($query, true, "Error filling in additional detail fields");
     $row = $this->db->fetchByAssoc($result);
     if ($row != null) {
         $this->reports_to_name = $locale->formatName($this->module_name, $row);
     } else {
         $this->reports_to_name = '';
     }
     parent::fill_in_additional_detail_fields();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:13,代码来源:Employee.php

示例3:

 function fill_in_additional_detail_fields()
 {
     // jmorais@dri Bug #56269
     parent::fill_in_additional_detail_fields();
     // ~jmorais@dri
     global $locale;
     $query = "SELECT u1.first_name, u1.last_name from users  u1, users  u2 where u1.id = u2.reports_to_id AND u2.id = '{$this->id}' and u1.deleted=0";
     $result = $this->db->query($query, true, "Error filling in additional detail fields");
     $row = $this->db->fetchByAssoc($result);
     if ($row != null) {
         global $locale;
         $this->reports_to_name = $locale->formatName('Users', $row);
     } else {
         $this->reports_to_name = '';
     }
     // Must set team_id for team widget purposes (default_team is primary team id)
     if (empty($this->team_id)) {
         $this->team_id = $this->default_team;
     }
     //set the team info if the team id has already been set.
     //running only if team class exists will prevent breakage during upgrade/flavor conversions
     if (class_exists('Team')) {
         // Set default_team_name for Campaigns WebToLeadCreation
         $this->default_team_name = Team::getTeamName($this->team_id);
     } else {
         //if no team id exists, set the team info to blank
         $this->default_team = '';
         $this->default_team_name = '';
         $this->team_set_id = '';
     }
     $this->_create_proper_name_field();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:32,代码来源:User.php

示例4: 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

示例5:

 function fill_in_additional_detail_fields()
 {
     global $locale;
     parent::fill_in_additional_detail_fields();
     $full_name = $locale->getLocaleFormattedName($this->first_name, $this->last_name, $this->salutation, $this->title);
     $this->name = $full_name;
     $this->full_name = $full_name;
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:8,代码来源:Prospect.php

示例6: 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

示例7:

 function fill_in_additional_detail_fields()
 {
     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 = BeanFactory::getBean('Campaigns');
         $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:jglaine,项目名称:sugar761-ent,代码行数:16,代码来源:Lead.php

示例8: 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


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