本文整理汇总了PHP中flexicontent_html::favicon方法的典型用法代码示例。如果您正苦于以下问题:PHP flexicontent_html::favicon方法的具体用法?PHP flexicontent_html::favicon怎么用?PHP flexicontent_html::favicon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类flexicontent_html
的用法示例。
在下文中一共展示了flexicontent_html::favicon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onDisplayCoreFieldValue
//.........这里部分代码省略.........
case 'state':
// state
$field->value[] = $item->state;
$field->{$prop} = $pretext . flexicontent_html::stateicon($item->state, $field->parameters) . $posttext;
break;
case 'voting':
// voting button
if ($_vote === false) {
$vote =& $item->vote;
} else {
$vote =& $_vote;
}
$field->value[] = 'button';
// dummy value to force display
$field->{$prop} = $pretext . flexicontent_html::ItemVote($field, 'all', $vote) . $posttext;
break;
case 'favourites':
// favourites button
if ($_favourites === false) {
$favourites =& $item->favs;
} else {
$favourites =& $_favourites;
}
if ($_favoured === false) {
$favoured =& $item->fav;
} else {
$favoured =& $_favoured;
}
$field->value[] = 'button';
// dummy value to force display
$favs = flexicontent_html::favoured_userlist($field, $item, $favourites);
$field->{$prop} = $pretext . '
<div class="fav-block">
' . flexicontent_html::favicon($field, $favoured, $item) . '
<div id="fcfav-reponse_item_' . $item->id . '" class="fcfav-reponse-tip">
<div class="fc-mssg-inline fc-info fc-iblock fc-nobgimage ' . ($favoured ? 'fcfavs-is-subscriber' : 'fcfavs-isnot-subscriber') . '">
' . JText::_($favoured ? 'FLEXI_FAVS_YOU_HAVE_SUBSCRIBED' : 'FLEXI_FAVS_CLICK_TO_SUBSCRIBE') . '
</div>
' . $favs . '
</div>
</div>
' . $posttext;
break;
case 'categories':
// assigned categories
$field->{$prop} = '';
if ($_categories === false) {
$categories =& $item->cats;
} else {
$categories =& $_categories;
}
if ($categories) {
// Get categories that should be excluded from linking
global $globalnoroute;
if (!is_array($globalnoroute)) {
$globalnoroute = array();
}
// Create list of category links, excluding the "noroute" categories
$field->{$prop} = array();
foreach ($categories as $category) {
$cat_id = $category->id;
if (in_array($cat_id, @$globalnoroute)) {
continue;
}
if (!isset($cat_links[$cat_id])) {
$cat_links[$cat_id] = JRoute::_(FlexicontentHelperRoute::getCategoryRoute($category->slug));
示例2: onDisplayCoreFieldValue
//.........这里部分代码省略.........
case 'state':
// state
$field->value[] = $item->state;
$field->display = $pretext . flexicontent_html::stateicon($item->state, $field->parameters) . $posttext;
break;
case 'voting':
// voting button
if ($_vote === false) {
$vote =& $item->vote;
} else {
$vote =& $_vote;
}
$field->value[] = 'button';
// dummy value to force display
$field->display = $pretext . flexicontent_html::ItemVote($field, 'all', $vote) . $posttext;
break;
case 'favourites':
// favourites button
if ($_favourites === false) {
$favourites =& $item->favs;
} else {
$favourites =& $_favourites;
}
if ($_favoured === false) {
$favoured =& $item->fav;
} else {
$favoured =& $_favoured;
}
$field->value[] = 'button';
// dummy value to force display
$favs = flexicontent_html::favoured_userlist($field, $item, $favourites);
$field->display = $pretext . '
<span class="fav-block">
' . flexicontent_html::favicon($field, $favoured, $item) . '
<span id="fcfav-reponse_' . $field->item_id . '" class="fcfav-reponse">
<small>' . $favs . '</small>
</span>
</span>
' . $posttext;
break;
case 'categories':
// assigned categories
$field->display = '';
if ($_categories === false) {
$categories =& $item->cats;
} else {
$categories =& $_categories;
}
if ($categories) {
// Get categories that should be excluded from linking
global $globalnoroute;
if (!is_array($globalnoroute)) {
$globalnoroute = array();
}
// Create list of category links, excluding the "noroute" categories
$field->display = array();
foreach ($categories as $category) {
$cat_id = $category->id;
if (in_array($cat_id, @$globalnoroute)) {
continue;
}
if (!isset($cat_links[$cat_id])) {
$cat_links[$cat_id] = JRoute::_(FlexicontentHelperRoute::getCategoryRoute($category->slug));
}
$cat_link = $cat_links[$cat_id];
$display = '<a class="fc_categories fc_category_' . $cat_id . ' link_' . $field->name . '" href="' . $cat_link . '">' . $category->title . '</a>';