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


PHP Utils_RecordBrowserCommon::create_linked_label方法代码示例

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


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

示例1: get_val


//.........这里部分代码省略.........
                     if (count($path) > 1) {
                         $res .= Utils_CommonDataCommon::get_value($col . '/' . $path[0], true);
                         if (count($path) > 2) {
                             $res .= $commondata_sep . '...';
                             $tooltip = '';
                             $full_path = $col;
                             foreach ($path as $w) {
                                 $full_path .= '/' . $w;
                                 $tooltip .= ($tooltip ? $commondata_sep : '') . Utils_CommonDataCommon::get_value($full_path, true);
                             }
                         }
                         $res .= $commondata_sep;
                     }
                     $val = Utils_CommonDataCommon::get_value($col . '/' . $v, true);
                     if (!$val) {
                         continue;
                     }
                     $res .= $val;
                     if ($first) {
                         $first = false;
                     } else {
                         $ret .= '<br>';
                     }
                     $res = self::no_wrap($res);
                     if ($tooltip) {
                         $res = '<span ' . Utils_TooltipCommon::open_tag_attrs($tooltip, false) . '>' . $res . '</span>';
                     }
                     $ret .= $res;
                 } else {
                     if (!$single_tab) {
                         list($tab, $v) = explode('/', $v, 2);
                     }
                     if ($first) {
                         $first = false;
                     } else {
                         $ret .= '<br>';
                     }
                     if ($col) {
                         $columns = explode('|', $col);
                         $ret .= Utils_RecordBrowserCommon::create_linked_label($tab, $columns, $v, $links_not_recommended);
                     } else {
                         $ret .= Utils_RecordBrowserCommon::create_default_linked_label($tab, $v, $links_not_recommended);
                     }
                 }
             }
             if ($ret == '') {
                 $ret = '---';
             }
         } elseif ($args['type'] == 'commondata') {
             if (!isset($val) || $val === '') {
                 $ret = '';
             } else {
                 $arr = explode('::', $args['param']['array_id']);
                 $path = array_shift($arr);
                 foreach ($arr as $v) {
                     $path .= '/' . $record[self::get_field_id($v)];
                 }
                 $path .= '/' . $record[$args['id']];
                 $ret = Utils_CommonDataCommon::get_value($path, true);
             }
             /*            } elseif ($args['type']=='record') {
                           if (!isset($val) || $val==='') {
                               $ret = '';
                           } else {
                               @list($rs,$rid) = explode('#',$record[$args['id']],2);
                               if(!$rid) $ret = '';
                               else {
                                   $ret = self::create_default_linked_label($rs,$rid,$links_not_recommended);
                               }
                           }*/
         } elseif ($args['type'] == 'autonumber') {
             if (!$links_not_recommended && isset($record['id']) && $record['id']) {
                 $ret = self::record_link_open_tag_r($tab, $record) . $val . self::record_link_close_tag();
             }
         } elseif ($args['type'] == 'currency') {
             $val = Utils_CurrencyFieldCommon::get_values($val);
             $ret = Utils_CurrencyFieldCommon::format($val[0], $val[1]);
         } elseif ($args['type'] == 'checkbox') {
             $ret = $ret ? __('Yes') : __('No');
         } elseif ($args['type'] == 'date') {
             if ($val != '') {
                 $ret = Base_RegionalSettingsCommon::time2reg($val, false, true, false);
             }
         } elseif ($args['type'] == 'timestamp') {
             if ($val != '') {
                 $ret = Base_RegionalSettingsCommon::time2reg($val, 'without_seconds');
             }
         } elseif ($args['type'] == 'time') {
             if ($val != '') {
                 $ret = Base_RegionalSettingsCommon::time2reg($val, 'without_seconds', false);
             }
         } elseif ($args['type'] == 'long text') {
             $ret = htmlspecialchars($val);
             $ret = str_replace("\n", '<br>', $ret);
             $ret = Utils_BBCodeCommon::parse($ret);
         }
     }
     unset($recurrence_call_stack[$function_call_id]);
     return $ret;
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:101,代码来源:RecordBrowserCommon_0.php

示例2: create_linked_label

 /**
  * Create linked label with text values from fields.
  * @param string|array $field Fields' ids list. In array or string separated
  * by '|'. e.g. array('first_name', 'last_name') or 'first_name|last_name'.
  * @param int $id Record's ID
  * @param bool $nolink Do not create link
  * @return string html with link
  */
 public function create_linked_label($field, $id, $nolink = false)
 {
     return Utils_RecordBrowserCommon::create_linked_label($this->tab, $field, $id, $nolink);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:12,代码来源:Recordset.php

示例3: display_company

 public static function display_company($record, $nolink = false, $desc = null)
 {
     if ($desc !== null) {
         $v = $record[$desc['id']];
     } elseif (is_array($record)) {
         $v = $record['id'];
     } else {
         $v = $record;
     }
     if (!is_numeric($v) && !is_array($v)) {
         return $v;
     }
     if ($v == -1) {
         return '---';
     }
     $def = '';
     $first = true;
     if (!is_array($v)) {
         $v = array($v);
     }
     foreach ($v as $k => $w) {
         if ($w == '') {
             break;
         }
         if ($first) {
             $first = false;
         } else {
             $def .= '<br>';
         }
         $def .= Utils_RecordBrowserCommon::no_wrap(Utils_RecordBrowserCommon::create_linked_label('company', 'Company Name', $w, $nolink));
     }
     if (!$def) {
         return '---';
     }
     return $def;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:36,代码来源:ContactsCommon_0.php

示例4: queue_tab

 public function queue_tab($count_f, $get_f, $statuses)
 {
     $t = time();
     $status =& $this->get_module_variable('queue_status', current(array_keys($statuses)));
     $offset =& $this->get_module_variable('queue_offset', 0);
     $form = $this->init_module(Libs_QuickForm::module_name());
     $theme = $this->pack_module(Base_Theme::module_name());
     $form->addElement('select', 'status', __('Status'), $statuses);
     $form->addElement('submit', 'submit_button', __('Show'));
     $form->addRule('status', 'Field required', 'required');
     $form->setDefaults(array('status' => $status));
     if ($form->validate()) {
         $data = $form->exportValues();
         if (array_key_exists($data['status'], $statuses)) {
             $status = $data['status'];
         }
         $offset = 0;
     }
     $form->assign_theme('form', $theme);
     $m = $this->init_module(Utils_GenericBrowser::module_name(), null, 'queue');
     $m->set_table_columns(array(array('name' => 'To', 'width' => 30, 'order' => 'toNumber'), array('name' => 'Status', 'width' => 10), array('name' => 'Date', 'width' => 10, 'order' => 'creationDate'), array('name' => 'File', 'width' => 30, 'order' => 'fileName')));
     $m->set_default_order(array('Date' => 'DESC'));
     $count = call_user_func($count_f, $status);
     if ($count === false) {
         $count = 0;
     }
     $limits = $m->get_limit($count);
     $order = $m->get_order();
     if ($count != 0) {
         $data = call_user_func($get_f, $status, $order[0]['order'], $order[0]['direction'], $limits['numrows'], (string) ($limits['offset'] + 1));
     }
     if ($count == 0 || $data === false) {
         $data = array();
     }
     foreach ($data as $row) {
         $from_rec = CRM_ContactsCommon::get_contacts(array('fax' => $row['toNumber']));
         foreach ($from_rec as &$rec) {
             $rec = CRM_ContactsCommon::contact_format_default($rec);
         }
         $from_rec_comp = CRM_ContactsCommon::get_companies(array('fax' => $row['toNumber']));
         foreach ($from_rec_comp as $rec) {
             $from_rec[] = Utils_RecordBrowserCommon::create_linked_label('company', 'Company Name', $rec);
         }
         $m->add_row(empty($from_rec) ? $row['toNumber'] : ' (' . implode(', ', $from_rec) . ')', $statuses[$row['faxStatus']], Base_RegionalSettingsCommon::time2reg($row['creationDate']), '<a href="' . $row['fileUrl'] . '" target="_blank">' . $row['fileName'] . '</a>');
     }
     $theme->assign('table_data', $this->get_html_of_module($m));
     $theme->display();
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:48,代码来源:Fax_0.php

示例5: display_bugtrack

 public static function display_bugtrack($v)
 {
     return Utils_RecordBrowserCommon::create_linked_label('bugtrack', 'Project Name', $v['id']);
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:4,代码来源:BugtrackCommon_0.php


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