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


PHP Tags::getTagNamesByObjectIds方法代碼示例

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


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

示例1: getTagNames

 /**
  * Return tag names for this object
  *
  * @access public
  * @param void
  * @return array
  */
 function getTagNames()
 {
     //Seba ver si es lo mismo ya que siempre que un mail esta en un tag los otros tambien
     //if (user_config_option('show_emails_as_conversations',true,logged_user()->getId())){
     if (user_config_option('show_emails_as_conversations')) {
         return Tags::getTagNamesByObjectIds(implode(',', $this->getConversationMailIds(true)), 'MailContents');
     } else {
         return parent::getTagNames();
     }
 }
開發者ID:rorteg,項目名稱:fengoffice,代碼行數:17,代碼來源:MailContent.class.php

示例2: getTagNames

 /**
  * Return tag names for this object
  *
  * @access public
  * @param void
  * @return array
  */
 function getTagNames()
 {
     if (user_config_option('show_emails_as_conversations', true, logged_user()->getId())) {
         return Tags::getTagNamesByObjectIds(implode(',', $this->getConversationMailIds(true)), 'MailContents');
     } else {
         return parent::getTagNames();
     }
 }
開發者ID:pnagaraju25,項目名稱:fengoffice,代碼行數:15,代碼來源:MailContent.class.php

示例3: executeReport


//.........這裏部分代碼省略.........
                         $first = false;
                         if ($order == $colCp) {
                             if ($cp->getType() == 'date') {
                                 $order_by = 'ORDER BY STR_TO_DATE(cpv' . $colCp . '.value, "%Y-%m-%d %H:%i:%s") ' . ($order_asc ? 'asc' : 'desc');
                             } else {
                                 $order_by = 'ORDER BY cpv' . $colCp . '.value ' . ($order_asc ? 'asc' : 'desc');
                             }
                         }
                     }
                 }
                 $index++;
             }
         }
         if ($order_by == '') {
             if (is_numeric($order)) {
                 $id = $order;
                 $openPar .= '(';
                 $selectFROM .= ' LEFT OUTER JOIN ' . TABLE_PREFIX . 'custom_property_values cpv' . $id . ' ON (t.id = cpv' . $id . '.object_id AND cpv' . $id . '.custom_property_id = ' . $id . '))';
                 $order_by = 'ORDER BY ' . $order;
             } else {
                 if ($object->getColumnType($order) == 'date') {
                     $order_by = 'ORDER BY STR_TO_DATE(t.' . $order . ', "%Y-%m-%d %H:%i:%s") ' . ($order_asc ? 'asc' : 'desc');
                 } else {
                     $order_by = 'ORDER BY t.' . $order . ' ' . ($order_asc ? 'asc' : 'desc');
                 }
             }
         }
         if ($to_print) {
             $limit_str = '';
         } else {
             $limit_str = ' LIMIT ' . $offset . ',' . $limit;
         }
         $sql = 'SELECT ' . $selectCols . ' FROM (' . $openPar . $selectFROM . ') ' . $selectWHERE . ' GROUP BY id ' . $order_by . $limit_str;
         $rows = DB::executeAll($sql);
         if (is_null($rows)) {
             $rows = array();
         }
         $rows = Reports::removeDuplicateRows($rows);
         $reportObjTitleCols = array();
         foreach ($rows as &$row) {
             foreach ($row as $col => $value) {
                 if (isset($titleColAlias[$col])) {
                     $reportObjTitleCols[$titleColAlias[$col]] = $value;
                 }
             }
             $title = $managerInstance->getReportObjectTitle($reportObjTitleCols);
             $iconame = strtolower($managerInstance->getItemClass());
             $id = $row['id'];
             unset($row['id']);
             $row = array_slice($row, count($titleCols));
             if (!$to_print) {
                 $row = array('link' => '<a class="link-ico ico-' . $iconame . '" title="' . clean($title) . '" target="new" href="' . get_url($controller, $view, array('id' => $id)) . '">&nbsp;</a>') + $row;
             }
             foreach ($row as $col => &$value) {
                 if (in_array($col, $managerInstance->getExternalColumns())) {
                     $value = self::getExternalColumnValue($col, $value);
                 } else {
                     if ($col != 'link') {
                         $value = html_to_text(clean($value));
                     }
                 }
                 if (self::isReportColumnEmail($value)) {
                     if (logged_user()->hasMailAccounts()) {
                         $value = '<a class="internalLink" href="' . get_url('mail', 'add_mail', array('to' => clean($value))) . '">' . clean($value) . '</a></div>';
                     } else {
                         $value = '<a class="internalLink" target="_self" href="mailto:' . clean($value) . '">' . clean($value) . '</a></div>';
                     }
                 }
             }
             if ($print_tags_idx > -1) {
                 $row['tag'] = implode(", ", Tags::getTagNamesByObjectIds($id, $report->getObjectType()));
             }
             if ($print_ws_idx > -1) {
                 $row['workspace'] = "";
                 $workspaces = WorkspaceObjects::getWorkspacesByObject($report->getObjectType(), $id, logged_user()->getWorkspacesQuery());
                 foreach ($workspaces as $workspace) {
                     $row['workspace'] .= ($row['workspace'] == "" ? "" : ", ") . $workspace->getName();
                 }
             }
             // TODO: reorder columns
             $row = str_replace('|', ',', $row);
         }
         // TODO: reorder column titles
         if ($print_tags_idx > -1) {
             $results['columns'][] = lang('tags');
         }
         if ($print_ws_idx > -1) {
             $results['columns'][] = lang('workspaces');
         }
         if (!$to_print) {
             if (is_array($results['columns'])) {
                 array_unshift($results['columns'], '');
             } else {
                 $results['columns'] = array('');
             }
         }
         $results['rows'] = $rows;
     }
     return $results;
 }
開發者ID:pnagaraju25,項目名稱:fengoffice,代碼行數:101,代碼來源:Reports.class.php


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