本文整理汇总了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>';
}
示例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>';
}
示例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;
}