本文整理汇总了PHP中ThemeHelper::createHash方法的典型用法代码示例。如果您正苦于以下问题:PHP ThemeHelper::createHash方法的具体用法?PHP ThemeHelper::createHash怎么用?PHP ThemeHelper::createHash使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThemeHelper
的用法示例。
在下文中一共展示了ThemeHelper::createHash方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: start_el
function start_el(&$output, $object, $depth = 0, $args = array(), $current_object_id = 0)
{
$this->iconClass = null;
if ($depth == 0) {
$this->icon = $object->icon;
$this->mega_menu_layout_column_index = 0;
$this->mega_menu_enable = $object->mega_menu_enable;
$this->mega_menu_layout = $object->mega_menu_layout;
if ($object->icon != '-1') {
$this->iconClass = 'pb-menu-icon pb-menu-icon-' . ThemeHelper::createHash($object->icon);
}
}
if ($this->mega_menu_enable == 1) {
if ($depth == 0 || $depth == 2) {
$output .= '<li class="' . join(' ', (array) $object->classes) . ($depth == 0 ? ' sf-mega-enable-1' : null) . ' ' . $this->iconClass . ' ' . '">';
}
if ($depth == 1) {
$Layout = new ThemeLayout();
$class = array('sf-mega-section', $Layout->getLayoutColumnCSSClass($this->mega_menu_layout, $this->mega_menu_layout_column_index, 'theme-layout-column-'));
$output .= '
<div' . ThemeHelper::createClassAttribute($class) . '>
';
$this->mega_menu_layout_column_index++;
}
if ($depth == 1) {
$output .= '
<span class="sf-mega-header">' . esc_html($object->title) . '</span>
';
} else {
$output .= '
<a href="' . esc_attr($object->url) . '"><span></span>' . $object->title . '</a>
';
}
} else {
$output .= '
<li class="' . join(' ', (array) $object->classes) . ($depth == 0 ? ' sf-mega-enable-0' : null) . ' ' . $this->iconClass . ' ' . '">
<a href="' . esc_attr($object->url) . '"><span></span>' . $object->title . '</a>
';
}
}