当前位置: 首页>>代码示例>>PHP>>正文


PHP JoomdleHelperContent::getMenuItem方法代码示例

本文整理汇总了PHP中JoomdleHelperContent::getMenuItem方法的典型用法代码示例。如果您正苦于以下问题:PHP JoomdleHelperContent::getMenuItem方法的具体用法?PHP JoomdleHelperContent::getMenuItem怎么用?PHP JoomdleHelperContent::getMenuItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JoomdleHelperContent的用法示例。


在下文中一共展示了JoomdleHelperContent::getMenuItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
     $logged_user = JFactory::getUser();
     $user_id = $logged_user->id;
     $id = $params->get('course_id');
     if (!$id) {
         $id = JRequest::getVar('course_id');
     }
     $id = (int) $id;
     $itemid = JoomdleHelperContent::getMenuItem();
     $link = base64_encode("index.php?option=com_joomdle&view=detail&course_id={$id}&Itemid={$itemid}");
     /* If user is logged, dont redirect */
     if (!$user_id) {
         $app->redirect(JURI::base() . "index.php?option=com_users&view=login&return={$link}");
     }
     if (!$id) {
         echo JText::_('COM_JOOMDLE_NO_COURSE_SELECTED');
         return;
     }
     $this->course_info = JoomdleHelperContent::getCourseInfo($id);
     $this->moodle_url = $params->get('MOODLE_URL');
     /* pathway */
     /*
     	$cat_slug = $this->course_info['cat_id'].":".$this->course_info['cat_name'];
     	if(is_object($menu) && $menu->query['view'] != 'detail') {
                             $pathway->addItem($this->course_info['cat_name'], 'index.php?view=coursecategory&cat_id='.$cat_slug);
                             $pathway->addItem($this->course_info['fullname'], '');
                     }
     */
     parent::display($tpl);
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:38,代码来源:view.html.php

示例2: defined

<?php defined('_JEXEC') or die('Restricted access'); ?>

<?php
$itemid = JoomdleHelperContent::getMenuItem();
?>
<div class="joomdle-gradelist<?php echo $this->pageclass_sfx;?>">
    <h1>
            <?php echo $this->course_info['fullname'] ; ?>
    </h1>

<?php
$app        = JFactory::getApplication();
$params = $app->getParams();

$use_pdf_integration = $params->get('use_pdf_integration');

if ($use_pdf_integration) : ?>
<P align="right">
<a href="index.php?option=com_joomdle&view=coursegrades&course_id=<?php echo $this->course_info['remoteid']; ?>&format=pdf"><img src="<?php echo JURI::root(); ?>/media/media/images/mime-icon-16/pdf.png" alt="PDF"></a>
</P>
<?php endif; ?>

<table width="100%" cellpadding="4" cellspacing="0" border="0" align="center" class="simpletable<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<tr>
        <td width="30%" height="20" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
                <?php echo JText::_('COM_JOOMDLE_CATEGORY'); ?>
        </td>
        <td width="30%" height="20" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>" style="text-align:center;" nowrap="nowrap">
                <?php echo JText::_('COM_JOOMDLE_ASSESSMENT_TITLE'); ?>
        </td>
        <td width="5%" height="20" class="sectiontableheader<?php echo $this->params->get( 'pageclass_sfx' ); ?>" style="text-align:center;" nowrap="nowrap">
开发者ID:esyacelga,项目名称:sisadmaca,代码行数:31,代码来源:default_cats.php

示例3: get_direct_link

 static function get_direct_link($mod, $course_id, $mod_id, $type)
 {
     $link = '';
     $params = JComponentHelper::getParams('com_joomdle');
     switch ($mod) {
         case 'resource':
             if ($type == 'page') {
                 if ($params->get('use_page_view')) {
                     $itemid = JoomdleHelperContent::getMenuItem();
                     if (!$itemid) {
                         $itemid = $params->get('joomdle_itemid');
                     }
                     $link = JRoute::_("index.php?option=com_joomdle&view=page&course_id={$course_id}&page_id={$mod_id}&itemid={$itemid}");
                 }
             } else {
                 if ($type == 'folder') {
                     $link = '';
                     break;
                 } else {
                     $link = $params->get('MOODLE_URL') . '/mod/resource/view.php?redirect=1&id=' . $mod_id;
                 }
             }
             break;
         case 'url':
             $link = $params->get('MOODLE_URL') . '/mod/url/view.php?redirect=1&id=' . $mod_id;
             break;
         case 'page':
             if ($params->get('use_page_view')) {
                 $itemid = JoomdleHelperContent::getMenuItem();
                 if (!$itemid) {
                     $itemid = $params->get('joomdle_itemid');
                 }
                 $link = JRoute::_("index.php?option=com_joomdle&view=page&course_id={$course_id}&page_id={$mod_id}");
             }
             break;
         case 'forum':
             $itemid = JoomdleHelperContent::getMenuItem();
             if (!$itemid) {
                 $itemid = $params->get('joomdle_itemid');
             }
             // Deal with news forum
             if ($type == 'news') {
                 // If is news forum, link to coursenews view instead of forum
                 $link = JRoute::_("index.php?option=com_joomdle&view=coursenews&course_id={$course_id}");
                 break;
             }
             if ($params->get('use_kunena_forums')) {
                 require_once JPATH_ADMINISTRATOR . '/components/com_joomdle/helpers/forum.php';
                 $forum_id = JoomdleHelperForum::get_kunena_forum_id($course_id, $mod_id);
                 $sub_version = JoomdleHelperForum::get_sub_version();
                 if ($forum_id) {
                     if ($sub_version > 3) {
                         $link = JRoute::_("index.php?option=com_kunena&view=category&catid={$forum_id}&course_id={$course_id}&Itemid={$itemid}");
                     } else {
                         $link = JRoute::_("index.php?option=com_kunena&func=showcat&catid={$forum_id}&course_id={$course_id}&Itemid={$itemid}");
                     }
                 } else {
                     $link = '';
                 }
             }
             break;
         case 'label':
             $link = 'none';
             break;
         case 'certificate':
             $link = $params->get('MOODLE_URL') . '/mod/certificate/view.php?certificate=1&id=' . $mod_id . '&action=review';
             break;
     }
     return $link;
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:70,代码来源:system.php


注:本文中的JoomdleHelperContent::getMenuItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。