示例#1
0
 /**
  * About view display method
  * @return void
  * */
 function display($tpl = null)
 {
     JToolBarHelper::title(JText::_('COM_MAXIMENUCK') . ' - ' . JText::_('CK_ABOUT'), 'home_maximenuck');
     // get the current version of the component
     require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
     $this->component_version = MaximenuckHelper::get_current_version();
     // Load the left sidebar.
     MaximenuckHelper::addSubmenu(JRequest::getCmd('view', 'modules'));
     parent::display($tpl);
 }
示例#2
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
     require_once JPATH_COMPONENT . '/helpers/html/modules.php';
     $state = $this->get('State');
     $canDo = MaximenuckHelper::getActions($state->get('filter.category_id'));
     JToolBarHelper::title(JText::_('COM_MAXIMENUCK') . ' - ' . JText::_('CK_MODULES_LIST'), 'logo_menumanagerck_large.png');
     if ($canDo->get('core.admin')) {
         // JToolBarHelper::preferences('com_maximenuck');
     }
 }
示例#3
0
    protected function addMenuSelection()
    {
        require_once JPATH_COMPONENT . '/helpers/maximenuckhelper.php';
        $canDo = MaximenuckHelper::getActions($this->state->get('filter.parent_id'));
        $menushtml = '';
        // Add a batch button
        if ($canDo->get('core.edit')) {
            $menushtml .= '<div id="toolbar-menu" class="btn-wrapper">';
            foreach ($this->get('Menus') as $menu) {
                $active = $menu->menutype == JFactory::getApplication()->input->get('menutype') ? ' active' : '';
                $menushtml .= '<a href="index.php?option=com_maximenuck&view=migration&menutype=' . $menu->menutype . '"><button class="btn btn-small btn-primary' . $active . '">
						<i class="icon-list-view"></i>
						' . $menu->title . '</button></a>';
            }
        } else {
            $menushtml = Jtext::_('COM_MENUMANAGERCK_NOT_HAVE_RIGHT_TO_EDIT');
        }
        return $menushtml;
    }
示例#4
0
 /**
  * Method to get the available menu item type options.
  *
  * @return  array  Array of groups with menu item types.
  * @since   1.6
  */
 public function getTypeOptions()
 {
     jimport('joomla.filesystem.file');
     $lang = JFactory::getLanguage();
     $list = array();
     // Get the list of components.
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query->select('name, element AS ' . $db->qn('option'));
     $query->from('#__extensions');
     $query->where('type = ' . $db->q('component'));
     $query->where('enabled = 1');
     $query->order('name ASC');
     $db->setQuery($query);
     $components = $db->loadObjectList();
     foreach ($components as $component) {
         if ($options = $this->getTypeOptionsByComponent($component->option)) {
             $list[$component->name] = $options;
             // Create the reverse lookup for link-to-name.
             foreach ($options as $option) {
                 if (isset($option->request)) {
                     $this->rlu[MaximenuckHelper::getLinkKey($option->request)] = $option->get('title');
                     if (isset($option->request['option'])) {
                         $lang->load($option->request['option'] . '.sys', JPATH_ADMINISTRATOR, null, false, false) || $lang->load($option->request['option'] . '.sys', JPATH_ADMINISTRATOR . '/components/' . $option->request['option'], null, false, false) || $lang->load($option->request['option'] . '.sys', JPATH_ADMINISTRATOR, $lang->getDefault(), false, false) || $lang->load($option->request['option'] . '.sys', JPATH_ADMINISTRATOR . '/components/' . $option->request['option'], $lang->getDefault(), false, false);
                     }
                 }
             }
         }
     }
     return $list;
 }