Esempio n. 1
0
    /**
     * Get the list of commands
     *
     * Prepending a special command not found in the manifest.xml
     *
     * @return  array
     */
    public function getCommands()
    {
        $option  = $this->getController()->getRequest()->option;
        //@TODO figure out why option=com_installer&view=components sets $request->option to NULL
        $active  = !$option || $option == 'com_installer';
        $view    = $active ? 'components' : KInflector::pluralize($this->getController()->getIdentifier()->name);

        $this->addCommand('Install/Uninstall', array(
            'href'   => JRoute::_('index.php?option=com_installer&view='.$view),
            'active' => $active
        ));

        $commands = parent::getCommands();

        //If the com_installer command is active, then following commands cannot be active
        if($commands['Install/Uninstall']->active)
        {
            foreach($commands as $key => $command)
            {
                if($key != 'Install/Uninstall') $command->active = false;
            }
        }

        return $commands;
    }
Esempio n. 2
0
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Groups', array('href' => JRoute::_('index.php?option=com_cache&view=groups'), 'active' => $name == 'group'));
     $this->addCommand('Keys', array('href' => JRoute::_('index.php?option=com_cache&view=keys'), 'active' => $name == 'key'));
     return parent::getCommands();
 }
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Your Extensions', array('href' => JRoute::_('index.php?option=com_extman&view=extensions'), 'active' => $name === 'extension'));
     $this->addCommand('Install More', array('href' => JRoute::_('index.php?option=com_installer'), 'active' => false));
     return parent::getCommands();
 }
Esempio n. 4
0
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Categories', array('href' => JRoute::_('index.php?option=com_carousel&view=categories'), 'active' => $name == 'category'));
     $this->addCommand('Items', array('href' => JRoute::_('index.php?option=com_carousel&view=items'), 'active' => $name == 'item'));
     return parent::getCommands();
 }
Esempio n. 5
0
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Press Review', array('href' => JRoute::_('index.php?option=com_pressreview&view=pressreviews'), 'active' => $name == 'pressreview'));
     $this->addCommand('Organisations', array('href' => JRoute::_('index.php?option=com_pressreview&view=organisations'), 'active' => $name == 'organisation'));
     return parent::getCommands();
 }
Esempio n. 6
0
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Images', array('href' => JRoute::_('index.php?option=com_cloudinary&view=images'), 'active' => $name == 'image'));
     $this->addCommand('Accounts', array('href' => JRoute::_('index.php?option=com_cloudinary&view=accounts'), 'active' => $name == 'account'));
     return parent::getCommands();
 }
Esempio n. 7
0
 /**
  * Get the menubar links
  * 
  * @return  array
  */
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Install/Uninstall', array('href' => JRoute::_('index.php?option=com_installer&view=components'), 'active' => true));
     $this->addCommand('Modules', array('href' => JRoute::_('index.php?option=com_extensions&view=modules')));
     $this->addCommand('Plugins', array('href' => JRoute::_('index.php?option=com_extensions&view=plugins')));
     $this->addCommand('Templates', array('href' => JRoute::_('index.php?option=com_extensions&view=templates')));
     $this->addCommand('Languages', array('href' => JRoute::_('index.php?option=com_extensions&view=languages')));
     return parent::getCommands();
 }
Esempio n. 8
0
 public function getCommands()
 {
     $name = $this->getController()->getIdentifier()->name;
     $this->addCommand('Events', array('href' => JRoute::_('index.php?option=com_events&view=events'), 'active' => $name == 'event'));
     $this->addCommand('Venues', array('href' => JRoute::_('index.php?option=com_events&view=venues'), 'active' => $name == 'venue'));
     $this->addCommand('Blocks', array('href' => JRoute::_('index.php?option=com_events&view=blocks'), 'active' => $name == 'block'));
     $this->addCommand('Days', array('href' => JRoute::_('index.php?option=com_events&view=days'), 'active' => $name == 'day'));
     $this->addCommand('Organisations', array('href' => JRoute::_('index.php?option=com_events&view=organisations'), 'active' => $name == 'organisation'));
     $this->addCommand('Rooms', array('href' => JRoute::_('index.php?option=com_events&view=rooms'), 'active' => $name == 'room'));
     return parent::getCommands();
 }
Esempio n. 9
0
 public function getCommands()
 {
     return parent::getCommands();
 }