當前位置: 首頁>>代碼示例>>PHP>>正文


PHP SugarBean::get_list_view_array方法代碼示例

本文整理匯總了PHP中SugarBean::get_list_view_array方法的典型用法代碼示例。如果您正苦於以下問題:PHP SugarBean::get_list_view_array方法的具體用法?PHP SugarBean::get_list_view_array怎麽用?PHP SugarBean::get_list_view_array使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在SugarBean的用法示例。


在下文中一共展示了SugarBean::get_list_view_array方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: substr

 function get_list_view_data()
 {
     $ret_array = parent::get_list_view_array();
     if (!empty($ret_array['STATUS']) && $ret_array['STATUS'] > 0) {
         $ret_array['STATUS'] = '<input type="checkbox" class="checkbox" style="checkbox" checked disabled>';
     } else {
         $ret_array['STATUS'] = '<input type="checkbox" class="checkbox" style="checkbox" disabled>';
     }
     if (strlen($ret_array['URL']) > 63) {
         $ret_array['URL'] = substr($ret_array['URL'], 0, 50) . '...' . substr($ret_array['URL'], -10);
     }
     $ret_array['CREATED_BY'] = get_assigned_user_name($this->created_by);
     $ret_array['PLACEMENT'] = translate('DROPDOWN_PLACEMENT', 'iFrames', $ret_array['PLACEMENT']);
     $ret_array['TYPE'] = translate('DROPDOWN_TYPE', 'iFrames', $ret_array['TYPE']);
     return $ret_array;
 }
開發者ID:BackupTheBerlios,項目名稱:livealphaprint,代碼行數:16,代碼來源:iFrame.php

示例2: strtolower

 function get_list_view_data()
 {
     global $locale, $current_user;
     $temp_array = parent::get_list_view_array();
     $related_type = $temp_array['RELATED_TYPE'];
     $related_id = $temp_array['RELATED_ID'];
     $is_person = SugarModule::get($related_type)->moduleImplements('Person');
     if ($is_person) {
         $query = "SELECT first_name, last_name FROM " . strtolower($related_type) . " WHERE id ='" . $related_id . "'";
     } else {
         $query = "SELECT name FROM " . strtolower($related_type) . " WHERE id ='" . $related_id . "'";
     }
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     if ($row) {
         $temp_array['RECIPIENT_NAME'] = $is_person ? $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '') : $row['name'];
     }
     //also store the recipient_email address
     $query = "SELECT addr.email_address FROM email_addresses addr,email_addr_bean_rel eb WHERE eb.deleted=0 AND addr.id=eb.email_address_id AND bean_id ='" . $related_id . "' AND primary_address = '1'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     if ($row) {
         $temp_array['RECIPIENT_EMAIL'] = $row['email_address'];
     }
     $this->email1 = $temp_array['RECIPIENT_EMAIL'];
     $temp_array['EMAIL1_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
     return $temp_array;
 }
開發者ID:jgera,項目名稱:sugarcrm_dev,代碼行數:28,代碼來源:EmailMan.php

示例3: strtolower

 function get_list_view_data()
 {
     global $locale;
     $temp_array = parent::get_list_view_array();
     $query = "select first_name, last_name from " . strtolower($temp_array['RELATED_TYPE']) . " where id ='" . $temp_array['RELATED_ID'] . "'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     if ($row) {
         $full_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name'], '');
         $temp_array['RECIPIENT_NAME'] = $full_name;
     }
     //also store the recipient_email address
     $query = "select addr.email_address from email_addresses addr,email_addr_bean_rel eb where eb.deleted=0 and addr.id=eb.email_address_id and bean_id ='" . $temp_array['RELATED_ID'] . "' and primary_address = '1'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     if ($row) {
         $temp_array['RECIPIENT_EMAIL'] = $row['email_address'];
     }
     return $temp_array;
 }
開發者ID:klr2003,項目名稱:sourceread,代碼行數:20,代碼來源:EmailMan.php

示例4: strtolower

 function get_list_view_data()
 {
     global $locale, $current_user;
     $temp_array = parent::get_list_view_array();
     $related_type = $temp_array['RELATED_TYPE'];
     $related_type = strtolower($related_type);
     $related_type = ucfirst($related_type);
     $related_id = $temp_array['RELATED_ID'];
     $related_bean = BeanFactory::getBean($related_type, $related_id);
     if ($related_bean) {
         $temp_array['RECIPIENT_NAME'] = $related_bean->get_summary_text();
     }
     //also store the recipient_email address
     $query = "SELECT addr.email_address FROM email_addresses addr,email_addr_bean_rel eb WHERE eb.deleted=0 AND addr.id=eb.email_address_id AND bean_id ='" . $related_id . "' AND primary_address = '1'";
     $result = $this->db->query($query);
     $row = $this->db->fetchByAssoc($result);
     if ($row) {
         $temp_array['RECIPIENT_EMAIL'] = $row['email_address'];
     }
     $this->email1 = $temp_array['RECIPIENT_EMAIL'];
     $temp_array['EMAIL_LINK'] = $current_user->getEmailLink('email1', $this, '', '', 'ListView');
     return $temp_array;
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:23,代碼來源:EmailMan.php


注:本文中的SugarBean::get_list_view_array方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。