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


PHP SugarBean::fill_in_additional_detail_fields方法代码示例

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


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

示例1:

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     $this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
     //$this->total_estimated_effort = $this->_get_total_estimated_effort($this->id);
     //$this->total_actual_effort = $this->_get_total_actual_effort($this->id);
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:7,代码来源:Project.php

示例2: build_related_list_by_user_id

/**
 * @param SugarBean $bean
 * @param string $user_id
 * @param string $where
 *
 * @return array
 */
function build_related_list_by_user_id($bean, $user_id, $where)
{
    $bean_id_name = strtolower($bean->object_name) . '_id';
    $select = "SELECT {$bean->table_name}.* from {$bean->rel_users_table},{$bean->table_name} ";
    $auto_where = ' WHERE ';
    if (!empty($where)) {
        $auto_where .= $where . ' AND ';
    }
    $auto_where .= " {$bean->rel_users_table}.{$bean_id_name}={$bean->table_name}.id AND {$bean->rel_users_table}.user_id='{$user_id}' AND {$bean->table_name}.deleted=0 AND {$bean->rel_users_table}.deleted=0";
    $query = $select . $auto_where;
    $result = $bean->db->query($query, true);
    $list = [];
    while ($row = $bean->db->fetchByAssoc($result)) {
        $row = $bean->convertRow($row);
        $bean->fetched_row = $row;
        $bean->fromArray($row);
        $bean->processed_dates_times = [];
        $bean->check_date_relationships_load();
        $bean->fill_in_additional_detail_fields();
        /**
         * PHP  5+ always treats objects as passed by reference
         * Need to clone it if we're using 5.0+
         * clone() not supported by 4.x
         */
        if (version_compare(phpversion(), "5.0", ">=")) {
            $newBean = clone $bean;
        } else {
            $newBean = $bean;
        }
        $list[] = $newBean;
    }
    return $list;
}
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:40,代码来源:activity_utils.php

示例3: formatForApi

 /**
  * Formats the bean so it is ready to be handed back to the API's client. Certian fields will get extra processing
  * to make them easier to work with from the client end.
  *
  * @param $bean SugarBean The bean you want formatted
  * @param $fieldList array Which fields do you want formatted and returned (leave blank for all fields)
  * @param $options array Currently no options are supported
  * @return array The bean in array format, ready for passing out the API to clients.
  */
 public function formatForApi(SugarBean $bean, array $fieldList = array(), array $options = array())
 {
     // If there was a field list requested and document_revision_id was not
     // a requested field we will have problems. Set the revision id so that
     // additional fields like filename get picked up.
     if (!empty($fieldList) && !in_array('document_revision_id', $fieldList)) {
         $db = DBManagerFactory::getInstance();
         // Get the revision ID so that it can be set into the bean
         $sql = "SELECT document_revision_id \n                    FROM {$bean->table_name} \n                    WHERE id = '{$bean->id}'";
         $rs = $db->query($sql);
         $row = $db->fetchByAssoc($rs);
         if (isset($row['document_revision_id'])) {
             // Set the revision and setup everything else for a document that
             // depends on a revision id, like filename, revision, etc
             $bean->document_revision_id = $row['document_revision_id'];
             $bean->fill_in_additional_detail_fields();
         }
     }
     return parent::formatForApi($bean, $fieldList, $options);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:29,代码来源:DocumentsApiHelper.php

示例4:

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     // Fill in the assigned_user_name
     $this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
     $this->created_by_name = get_assigned_user_name($this->created_by);
     $this->modified_by_name = get_assigned_user_name($this->modified_user_id);
     $account_info = $this->getAccount($this->id);
     $this->account_name = $account_info['account_name'];
     $this->account_id = $account_info['account_id'];
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:11,代码来源:Case.php

示例5: intval

 function fill_in_additional_detail_fields()
 {
     global $locale;
     parent::fill_in_additional_detail_fields();
     if (!empty($this->contact_id)) {
         $query = "SELECT first_name, last_name FROM contacts ";
         $query .= "WHERE id='{$this->contact_id}' AND deleted=0";
         $result = $this->db->limitQuery($query, 0, 1, true, " Error filling in additional detail fields: ");
         // Get the contact name.
         $row = $this->db->fetchByAssoc($result);
         $GLOBALS['log']->info("additional call fields {$query}");
         if ($row != null) {
             $this->contact_name = $locale->formatName('Contacts', $row);
             $GLOBALS['log']->debug("Call({$this->id}): contact_name = {$this->contact_name}");
             $GLOBALS['log']->debug("Call({$this->id}): contact_id = {$this->contact_id}");
         }
     }
     if (!isset($this->time_hour_start)) {
         $this->time_start_hour = intval(substr($this->time_start, 0, 2));
     }
     //if-else
     if (isset($this->time_minute_start)) {
         $time_start_minutes = $this->time_minute_start;
     } else {
         $time_start_minutes = substr($this->time_start, 3, 5);
         if ($time_start_minutes > 0 && $time_start_minutes < 15) {
             $time_start_minutes = "15";
         } else {
             if ($time_start_minutes > 15 && $time_start_minutes < 30) {
                 $time_start_minutes = "30";
             } else {
                 if ($time_start_minutes > 30 && $time_start_minutes < 45) {
                     $time_start_minutes = "45";
                 } else {
                     if ($time_start_minutes > 45) {
                         $this->time_start_hour += 1;
                         $time_start_minutes = "00";
                     }
                 }
             }
         }
         //if-else
     }
     //if-else
     if (isset($this->time_hour_start)) {
         $time_start_hour = $this->time_hour_start;
     } else {
         $time_start_hour = intval(substr($this->time_start, 0, 2));
     }
     global $timedate;
     $this->time_meridiem = $timedate->AMPMMenu('', $this->time_start, 'onchange="SugarWidgetScheduler.update_time();"');
     $hours_arr = array();
     $num_of_hours = 13;
     $start_at = 1;
     if (empty($time_meridiem)) {
         $num_of_hours = 24;
         $start_at = 0;
     }
     //if
     for ($i = $start_at; $i < $num_of_hours; $i++) {
         $i = $i . "";
         if (strlen($i) == 1) {
             $i = "0" . $i;
         }
         $hours_arr[$i] = $i;
     }
     //for
     if (!isset($this->duration_minutes)) {
         $this->duration_minutes = $this->minutes_value_default;
     }
     //setting default date and time
     if (is_null($this->date_start)) {
         $this->date_start = $timedate->now();
     }
     if (is_null($this->time_start)) {
         $this->time_start = $timedate->to_display_time(TimeDate::getInstance()->nowDb(), true);
     }
     if (is_null($this->duration_hours)) {
         $this->duration_hours = "0";
     }
     if (is_null($this->duration_minutes)) {
         $this->duration_minutes = "1";
     }
     if (empty($this->id) && !empty($_REQUEST['date_start'])) {
         $this->date_start = $_REQUEST['date_start'];
     }
     if (!empty($this->date_start)) {
         $td = SugarDateTime::createFromFormat($GLOBALS['timedate']->get_date_time_format(), $this->date_start);
         if (!empty($td)) {
             if (!empty($this->duration_hours) && $this->duration_hours != '') {
                 $td = $td->modify("+{$this->duration_hours} hours");
             }
             if (!empty($this->duration_minutes) && $this->duration_minutes != '') {
                 $td = $td->modify("+{$this->duration_minutes} mins");
             }
             $this->date_end = $td->format($GLOBALS['timedate']->get_date_time_format());
         } else {
             $GLOBALS['log']->fatal("Meeting::save: Bad date {$this->date_start} for format " . $GLOBALS['timedate']->get_date_time_format());
         }
     }
//.........这里部分代码省略.........
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:101,代码来源:Meeting.php

示例6: array

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     //TODO:  Seems odd we need to clear out these values so that list views don't show the previous rows value if current value is blank
     $this->getRelatedFields('Contacts', $this->contact_id, array('name' => 'contact_name', 'phone_work' => 'contact_phone'));
     if (!empty($this->contact_name)) {
         $emailAddress = new SugarEmailAddress();
         $this->contact_email = $emailAddress->getPrimaryAddress(false, $this->contact_id, 'Contacts');
     }
     if (isset($this->contact_id) && $this->contact_id != '') {
         $contact = new Contact();
         $contact->retrieve($this->contact_id);
         if (isset($contact->id)) {
             $this->contact_name = $contact->full_name;
         }
     }
 }
开发者ID:omusico,项目名称:windcrm,代码行数:17,代码来源:Note.php

示例7: strtolower

 function fill_in_additional_detail_fields()
 {
     global $theme;
     global $current_language;
     global $timedate;
     parent::fill_in_additional_detail_fields();
     $mod_strings = return_module_language($current_language, 'KBDocuments');
     $query = "SELECT filename,revision,file_ext FROM kbdocument_revisions WHERE id='{$this->kbdocument_revision_id}'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     //popuplate filename
     $this->filename = $row['filename'];
     $this->latest_revision = $row['revision'];
     //populate the file url.
     //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions.
     //if file is not found then default image file will be used.
     global $img_name;
     global $img_name_bare;
     if (!empty($row['file_ext'])) {
         $img_name = SugarThemeRegistry::current()->getImageURL(strtolower($row['file_ext']) . "_image_inline.gif");
         $img_name_bare = strtolower($row['file_ext']) . "_image_inline";
     }
     //set default file name.
     if (!empty($img_name) && file_exists($img_name)) {
         $img_name = $img_name_bare;
     } else {
         $img_name = "def_image_inline";
         //todo change the default image.
     }
     $this->file_url = "<a href='index.php?entryPoint=download&id={$this->document_revision_id}&type=Documents' target='_blank'>" . SugarThemeRegistry::current()->getImage($img_name, 'border="0"', null, null, '.gif', $mod_strings['LBL_LIST_VIEW_DOCUMENT']) . "</a>";
     $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}";
     //get last_rev_by user name.
     $query = "SELECT first_name,last_name, document_revisions.date_entered as rev_date FROM users, document_revisions WHERE users.id = document_revisions.created_by and document_revisions.id = '{$this->document_revision_id}'";
     $result = $this->db->query($query, true, "Eror fetching user name: ");
     $row = $this->db->fetchByAssoc($result);
     if (!empty($row)) {
         $this->last_rev_created_name = $row['first_name'] . ' ' . $row['last_name'];
         $this->last_rev_create_date = $timedate->to_display_date_time($row['rev_date']);
     }
     $this->name = $this->kbdocument_name;
     $this->body = html_entity_decode(KBDocument::get_kbdoc_body_without_incrementing_count($this->id), ENT_COMPAT | ENT_QUOTES, 'UTF-8');
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:42,代码来源:KBDocument.php

示例8: strtolower

 function fill_in_additional_detail_fields()
 {
     global $theme;
     global $current_language;
     global $timedate;
     global $locale;
     parent::fill_in_additional_detail_fields();
     $mod_strings = return_module_language($current_language, 'Documents');
     $query = "SELECT filename,revision,file_ext FROM document_revisions WHERE id='{$this->document_revision_id}'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     //popuplate filename
     if (isset($row['filename'])) {
         $this->filename = $row['filename'];
     }
     //$this->latest_revision = $row['revision'];
     if (isset($row['revision'])) {
         $this->revision = $row['revision'];
     }
     //populate the file url.
     //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions.
     //if file is not found then default image file will be used.
     global $img_name;
     global $img_name_bare;
     if (!empty($row['file_ext'])) {
         $img_name = SugarThemeRegistry::current()->getImageURL(strtolower($row['file_ext']) . "_image_inline.gif");
         $img_name_bare = strtolower($row['file_ext']) . "_image_inline";
     }
     //set default file name.
     if (!empty($img_name) && file_exists($img_name)) {
         $img_name = $img_name_bare;
     } else {
         $img_name = "def_image_inline";
         //todo change the default image.
     }
     if ($this->ACLAccess('DetailView')) {
         $this->file_url = "<a href='index.php?entryPoint=download&id=" . basename(UploadFile::get_url($this->filename, $this->document_revision_id)) . "&type=Documents' target='_blank'>" . SugarThemeRegistry::current()->getImage($img_name, 'alt="' . $mod_strings['LBL_LIST_VIEW_DOCUMENT'] . '"  border="0"') . "</a>";
         $this->file_url_noimage = basename(UploadFile::get_url($this->filename, $this->document_revision_id));
     } else {
         $this->file_url = "";
         $this->file_url_noimage = "";
     }
     //get last_rev_by user name.
     $query = "SELECT first_name,last_name, document_revisions.date_entered as rev_date FROM users, document_revisions WHERE users.id = document_revisions.created_by and document_revisions.id = '{$this->document_revision_id}'";
     $result = $this->db->query($query, true, "Eror fetching user name: ");
     $row = $this->db->fetchByAssoc($result);
     if (!empty($row)) {
         $this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
         $this->last_rev_create_date = $timedate->to_display_date_time($row['rev_date']);
     }
     global $app_list_strings;
     if (!empty($this->status_id)) {
         //_pp($this->status_id);
         $this->status = $app_list_strings['document_status_dom'][$this->status_id];
     }
     $this->related_doc_name = Document::get_document_name($this->related_doc_id);
     $this->related_doc_rev_number = DocumentRevision::get_document_revision_name($this->related_doc_rev_id);
     $this->save_file = basename($this->file_url_noimage);
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:59,代码来源:Document.php

示例9:

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     $this->entry_count = $this->get_entry_count();
 }
开发者ID:omusico,项目名称:windcrm,代码行数:5,代码来源:ProspectList.php

示例10:

 function fill_in_additional_detail_fields()
 {
     /*
     		// Fill in the assigned_user_name
     		$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
     */
     parent::fill_in_additional_detail_fields();
     //$this->created_by_name = get_assigned_user_name($this->created_by);
     //$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
     $this->set_release();
     $this->set_fixed_in_release();
 }
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:12,代码来源:Bug.php

示例11:

 function fill_in_additional_detail_fields()
 {
     global $theme;
     global $current_language;
     parent::fill_in_additional_detail_fields();
     $mod_strings = return_module_language($current_language, 'Documents');
     //find the document name and current version.
     $query = "SELECT document_name, revision, document_revision_id FROM documents, document_revisions where documents.id = '{$this->document_id}' AND document_revisions.id = documents.document_revision_id";
     $result = $this->db->query($query, true, "Error fetching document details...:");
     $row = $this->db->fetchByAssoc($result);
     if ($row != null) {
         $this->document_name = $row['document_name'];
         $this->latest_revision = $row['revision'];
         $this->latest_revision_id = $row['document_revision_id'];
     }
     //populate the file url.
     //image is selected based on the extension name <ext>_image_inline, extension is stored in document_revisions.
     //if file is not found then default image file will be used.
     global $img_name;
     global $img_name_bare;
     if (!empty($this->file_ext)) {
         $img_name = SugarThemeRegistry::current()->getImageURL("{$this->file_ext}_image_inline.gif");
         $img_name_bare = "{$this->file_ext}_image_inline";
     }
     //set default file name.
     if (!empty($img_name) && file_exists($img_name)) {
         $img_name = $img_name_bare;
     } else {
         $img_name = "def_image_inline";
         //todo change the default image.
     }
     if ($this->ACLAccess('DetailView')) {
         $this->file_url = "<a href='" . UploadFile::get_url($this->filename, $this->id) . "' target='_blank'>" . SugarThemeRegistry::current()->getImage($img_name, 'alt="' . $mod_strings['LBL_LIST_VIEW_DOCUMENT'] . '"  border="0"') . "</a>";
     } else {
         $this->file_url = "";
     }
 }
开发者ID:klr2003,项目名称:sourceread,代码行数:37,代码来源:DocumentRevision.php

示例12:

 function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     $this->setCalculatedValues(true);
     $types = get_bean_select_array(true, 'ContractType', 'name', 'deleted=0', 'list_order');
     $this->type_options = get_select_options_with_id($types, $this->type);
     $currency = BeanFactory::getBean('Currencies');
     if (isset($this->currency_id) && !empty($this->currency_id)) {
         $currency->retrieve($this->currency_id);
         if ($currency->deleted != 1) {
             $this->currency_name = $currency->iso4217 . ' ' . $currency->symbol;
         } else {
             $this->currency_name = $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol();
         }
     } else {
         $this->currency_name = $currency->getDefaultISO4217() . ' ' . $currency->getDefaultCurrencySymbol();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:Contract.php

示例13:

	function fill_in_additional_detail_fields() 
	{
		parent::fill_in_additional_detail_fields();
	}
开发者ID:jeffcao,项目名称:fzglsys_v5,代码行数:4,代码来源:asolConfigBean.php

示例14: fill_in_additional_detail_fields

 /**
  * Fill in additional details for the detail view
  */
 public function fill_in_additional_detail_fields()
 {
     parent::fill_in_additional_detail_fields();
     //find parent name if  parentid is there.
     if (!empty($this->parent_id) and $this->parent_id != '') {
         $query = "select name from product_categories where id='{$this->parent_id}'";
         $result = $this->db->query($query);
         if (!empty($result)) {
             $row = $this->db->fetchByAssoc($result);
             if (!empty($row)) {
                 $this->parent_name = $row['name'];
             }
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:18,代码来源:ProductCategory.php

示例15:

 function fill_in_additional_detail_fields()
 {
     if ($this->report_type == "Matrix") {
         $this->report_type = "summary";
     }
     // if
     parent::fill_in_additional_detail_fields();
     $this->get_scheduled_query();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:9,代码来源:SavedReport.php


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