本文整理汇总了PHP中JoomdleHelperContent::getCourseCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomdleHelperContent::getCourseCategory方法的具体用法?PHP JoomdleHelperContent::getCourseCategory怎么用?PHP JoomdleHelperContent::getCourseCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoomdleHelperContent
的用法示例。
在下文中一共展示了JoomdleHelperContent::getCourseCategory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($tpl = null)
{
global $mainframe;
$app = JFactory::getApplication();
$pathway = $app->getPathWay();
$menus = $app->getMenu();
$menu = $menus->getActive();
$params = $app->getParams();
$this->assignRef('params', $params);
$id = JRequest::getVar('cat_id');
if (!$id) {
$id = $params->get('cat_id');
}
$id = (int) $id;
if (!$id) {
echo JText::_('COM_JOOMDLE_NO_CATEGORY_SELECTED');
return;
}
$this->cat_id = $id;
$this->cat_name = JoomdleHelperContent::call_method('get_cat_name', $id);
$user = JFactory::getUser();
$username = $user->username;
$this->cursos = JoomdleHelperContent::getCourseCategory($id, $username);
$this->categories = JoomdleHelperContent::getCourseCategories($id);
if (is_object($menu) && $menu->query['view'] != 'coursecategory') {
$pathway->addItem($this->cat_name, '');
}
$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
$document = JFactory::getDocument();
$document->setTitle($this->cat_name);
parent::display($tpl);
}
示例2: foreach
?>
</div>
<?php
}
?>
</div>
<?php
}
//courses
?>
<?php
$parent_name = $cat['name'];
$odd = 0;
if (is_array($categories)) {
foreach ($categories as $cat) {
$cursos = JoomdleHelperContent::getCourseCategory($cat['id'], $username);
$cat_id = $cat['id'];
if (!is_array($cursos) || !count($cursos)) {
continue;
}
?>
<h4>
<?php
echo $parent_name . '>' . $cat['name'];
?>
</h4>
<?php
foreach ($cursos as $curso) {
?>
<div class="joomdle_course_list_item">
<div class="joomdle_item_title joomdle_course_list_item_title">