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


PHP SugarBean::get_summary_text方法代码示例

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


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

示例1: trackView

 /**
  * Track a view for a particular bean.
  *
  * @param SugarBean $seed
  * @param string $current_view
  */
 function trackView($seed, $current_view)
 {
     $trackerManager = TrackerManager::getInstance();
     if ($monitor = $trackerManager->getMonitor('tracker')) {
         $monitor->setValue('date_modified', TimeDate::getInstance()->nowDb());
         $monitor->setValue('user_id', $GLOBALS['current_user']->id);
         $monitor->setValue('module_name', $seed->module_dir);
         $monitor->setValue('action', $current_view);
         $monitor->setValue('item_id', $seed->id);
         $monitor->setValue('item_summary', $seed->get_summary_text());
         $monitor->setValue('visible', true);
         $trackerManager->saveMonitor($monitor, TRUE, TRUE);
     }
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:20,代码来源:SugarWebServiceUtilv3_1.php

示例2: _getModuleTitleParams

 /**
  * Returns an array composing of the breadcrumbs to use for the module title
  *
  * @param bool $browserTitle true if the returned string is being used for the browser title, meaning
  *                           there should be no HTML in the string
  *
  * @return array
  */
 protected function _getModuleTitleParams($browserTitle = false)
 {
     $params = [$this->_getModuleTitleListParam($browserTitle)];
     if (isset($this->action)) {
         switch ($this->action) {
             case 'EditView':
                 if (!empty($this->bean->id) && (empty($_REQUEST['isDuplicate']) || $_REQUEST['isDuplicate'] === 'false')) {
                     $params[] = "<a href='index.php?module={$this->module}&action=DetailView&record={$this->bean->id}'>" . $this->bean->get_summary_text() . "</a>";
                     $params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
                 } else {
                     $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
                 }
                 break;
             case 'DetailView':
                 $beanName = $this->bean->get_summary_text();
                 $params[] = $beanName;
                 break;
         }
     }
     return $params;
 }
开发者ID:butschster,项目名称:sugarcrm_dev,代码行数:29,代码来源:SugarView.php

示例3: trackAction

 /**
  * Adds an entry in the tracker table noting that this record was touched
  *
  * @param SugarBean $bean The bean to record in the tracker table
  */
 public function trackAction(SugarBean $bean)
 {
     $manager = $this->getTrackerManager();
     $monitor = $manager->getMonitor('tracker');
     if (!$monitor) {
         // This tracker is disabled.
         return;
     }
     if (empty($bean->id) || isset($bean->new_with_id) && $bean->new_with_id) {
         // It's a new bean, don't record it.
         // Tracking bean saves/creates happens in the SugarBean so it is always recorded
         return;
     }
     $monitor->setValue('team_id', $this->api->user->getPrivateTeamID());
     $monitor->setValue('action', $this->action);
     $monitor->setValue('user_id', $this->api->user->id);
     $monitor->setValue('module_name', $bean->module_dir);
     $monitor->setValue('date_modified', TimeDate::getInstance()->nowDb());
     $monitor->setValue('visible', 1);
     $monitor->setValue('item_id', $bean->id);
     $monitor->setValue('item_summary', $bean->get_summary_text());
     $manager->saveMonitor($monitor, true, true);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:28,代码来源:SugarApi.php

示例4: getRecordSummary

function getRecordSummary(SugarBean $bean)
{
    global $listViewDefs;
    if (!isset($listViewDefs) || !isset($listViewDefs[$bean->module_dir])) {
        if (file_exists('custom/modules/' . $bean->module_dir . '/metadata/listviewdefs.php')) {
            require 'custom/modules/' . $bean->module_dir . '/metadata/listviewdefs.php';
        } else {
            if (file_exists('modules/' . $bean->module_dir . '/metadata/listviewdefs.php')) {
                require 'modules/' . $bean->module_dir . '/metadata/listviewdefs.php';
            }
        }
    }
    if (!isset($listViewDefs) || !isset($listViewDefs[$bean->module_dir])) {
        return $bean->get_summary_text();
    }
    $summary = array();
    foreach ($listViewDefs[$bean->module_dir] as $key => $entry) {
        if (!$entry['default']) {
            continue;
        }
        $key = strtolower($key);
        if (in_array($key, array('date_entered', 'date_modified', 'name'))) {
            continue;
        }
        $summary[] = $bean->{$key};
    }
    $summary = array_filter($summary);
    return implode(' || ', $summary);
}
开发者ID:NALSS,项目名称:SuiteCRM,代码行数:29,代码来源:UnifiedSearch.php

示例5: getBeanAttributes

 /**
  * Helper to denormalize critical bean attributes.
  *
  * @param  SugarBean $bean
  *
  * @return array     Contains name, type, module and ID of the bean.
  */
 public static function getBeanAttributes(SugarBean $bean)
 {
     return array('name' => $bean->get_summary_text(), 'type' => $bean->object_name, 'module' => $bean->module_name, 'id' => $bean->id);
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:11,代码来源:ActivityQueueManager.php

示例6: getSummaryText

 public function getSummaryText()
 {
     if ($this->bean !== FALSE) {
         return $this->bean->get_summary_text();
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:6,代码来源:SugarSearchEngineAbstractResult.php


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