本文整理匯總了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);
}