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


PHP DashletGeneric::display方法代碼示例

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


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

示例1: display

 /**
  *
  * @return the fully rendered dashlet
  */
 function display()
 {
     $listview = parent::display();
     $GLOBALS['current_sugarfeed'] = $this;
     $listview = preg_replace_callback('/\\{([^\\^ }]+)\\.([^\\}]+)\\}/', create_function('$matches', 'if($matches[1] == "this"){$var = $matches[2]; return $GLOBALS[\'current_sugarfeed\']->$var;}else{return translate($matches[2], $matches[1]);}'), $listview);
     $listview = preg_replace('/\\[(\\w+)\\:([\\w\\-\\d]*)\\:([^\\]]*)\\]/', '<a href="index.php?module=$1&action=DetailView&record=$2"><img src="themes/default/images/$1.gif" border=0>$3</a>', $listview);
     return $listview . '</div></div>';
 }
開發者ID:nickpro,項目名稱:sugarcrm_dev,代碼行數:12,代碼來源:SugarFeedDashlet.php

示例2: display

 /**
  *
  * @return the fully rendered dashlet
  */
 function display()
 {
     $listview = parent::display();
     $GLOBALS['current_sugarfeed'] = $this;
     $listview = preg_replace_callback('/\\{([^\\^ }]+)\\.([^\\}]+)\\}/', create_function('$matches', 'if($matches[1] == "this"){$var = $matches[2]; return $GLOBALS[\'current_sugarfeed\']->$var;}else{return translate($matches[2], $matches[1]);}'), $listview);
     //grab each token and store the module for later processing
     preg_match_all('/\\[(\\w+)\\:/', $listview, $alt_modules);
     //now process each token to create the proper url and image tags in feed, leaving a string for the alt to be replaced in next step
     $listview = preg_replace('/\\[(\\w+)\\:([\\w\\-\\d]*)\\:([^\\]]*)\\]/', '<a href="index.php?module=$1&action=DetailView&record=$2"><img src="themes/default/images/$1.gif" border=0 REPLACE_ALT>$3</a>', $listview);
     /*SKIP_IMAGE_TAG*/
     //process each module for the singular version so we can populate the alt tag on the image
     $altStrings = array();
     foreach ($alt_modules[1] as $alt) {
         //create the alt string and replace the alt token
         $altString = 'alt="' . translate('LBL_VIEW', 'SugarFeed') . ' ' . $GLOBALS['app_list_strings']['moduleListSingular'][$alt] . '"';
         $listview = preg_replace('/REPLACE_ALT/', $altString, $listview, 1);
     }
     return $listview . '</div></div>';
 }
開發者ID:netconstructor,項目名稱:sugarcrm_dev,代碼行數:23,代碼來源:SugarFeedDashlet.php

示例3: display

 /**
  * 
  * @return the fully rendered dashlet
  */
 function display()
 {
     $listview = parent::display();
     $GLOBALS['current_groupmessage'] = $this;
     $listview = preg_replace_callback('/\\{([^\\}]+)\\.([^\\}]+)\\}/', create_function('$matches', 'if($matches[1] == "this"){$var = $matches[2]; return $GLOBALS[\'current_groupmessage\']->$var;}else{return translate($matches[2], $matches[1]);}'), $listview);
     $listview = preg_replace('/\\[(\\w+)\\:([\\w\\-\\d]*)\\:([^\\]]*)\\]/', '<a href="index.php?module=$1&action=DetailView&record=$2"><img src="themes/default/images/$1.gif" border=0>$3</a>', $listview);
     // Make this dashlet scroll if it gets too large
     $listview = '<div class="sugarFeedDashlet">' . $listview . '</div>';
     return $listview;
 }
開發者ID:sysraj86,項目名稱:carnivalcrm,代碼行數:14,代碼來源:MessageDashlet.php


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