Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/src/Chamilo/CoreBundle/Menu/CourseMenuBuilder.php

26 lines
809 B

<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class CourseMenuBuilder extends ContainerAware
{
public function courseMenu(FactoryInterface $factory, array $options)
{
$security = $this->container->get('security.context');
$menu = $factory->createItem('root');
if ($security->isGranted('IS_AUTHENTICATED_FULLY')) {
$menu->setChildrenAttribute('class', 'nav nav-pills nav-stacked');
$menu->addChild('Create course', array('route' => 'logout'));
$menu->addChild('Catalog', array('route' => 'logout'));
$menu->addChild('History', array('route' => 'logout'));
}
return $menu;
}
}