本文整理汇总了PHP中XenForo_Template_Helper_Core::helperBodyText方法的典型用法代码示例。如果您正苦于以下问题:PHP XenForo_Template_Helper_Core::helperBodyText方法的具体用法?PHP XenForo_Template_Helper_Core::helperBodyText怎么用?PHP XenForo_Template_Helper_Core::helperBodyText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XenForo_Template_Helper_Core
的用法示例。
在下文中一共展示了XenForo_Template_Helper_Core::helperBodyText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderJson
public function renderJson()
{
$output = $this->_renderer->getDefaultOutputArray(get_class($this), $this->_params, $this->_templateName);
if ($this->_params['isStatus']) {
$output['statusHtml'] = XenForo_Template_Helper_Core::helperBodyText($this->_params['profilePost']['message']) . ' ' . XenForo_Template_Helper_Core::dateTimeHtml($this->_params['profilePost']['post_date']);
}
return XenForo_ViewRenderer_Json::jsonEncodeForOutput($output);
}
示例2: _collapsibleNavigation
protected function _collapsibleNavigation($categories, $parentCategoryId = null)
{
$collapsible = $this->_params['collapsible'];
$this->_params['loadCollapsible'] = strpos($collapsible, 'collapsible') !== false;
$hasChildren = false;
$outputHtml = '<ol class="categoryList%s" data-liststyle="' . $collapsible . '">%s</ol>';
$childrenHtml = '';
$jsClass = '';
if ($parentCategoryId === null) {
$jsClass = ' CategoryList';
}
foreach ($categories as $categoryId => $category) {
$expanded = '';
if (in_array($categoryId, array_keys($this->_params['categoryBreadcrumbs']))) {
$expanded = ' sapling-expanded';
}
if ($category['parent_category_id'] == $parentCategoryId) {
$hasChildren = true;
$selected = '';
if (!empty($this->_params['category']['category_id'])) {
if ($this->_params['category']['category_id'] == $categoryId) {
$selected = ' class="selected"';
$expanded = ' sapling-expanded';
}
}
$childrenHtml .= '<li class="_categoryDepth' . $category['depth'] . $expanded . '">
<a href="' . XenForo_Link::buildPublicLink('xengallery/categories', $category) . '"' . $selected . '>' . XenForo_Template_Helper_Core::helperBodyText($category['category_title']) . '</a>';
$childrenHtml .= $this->_collapsibleNavigation($categories, $category['category_id']);
$childrenHtml .= '</li>';
}
}
if (!$hasChildren) {
$outputHtml = '';
}
return sprintf($outputHtml, $jsClass, $childrenHtml);
}