78 lines
2.2 KiB
PHP
78 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* @package Joomla.Component.Builder
|
|
*
|
|
* @created 30th April, 2015
|
|
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
|
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
|
* @copyright Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved.
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
*/
|
|
|
|
// No direct access to this file
|
|
defined('_JEXEC') or die('Restricted access');
|
|
?>
|
|
###BOM###
|
|
|
|
// No direct access to this file
|
|
defined('_JEXEC') or die('Restricted access');
|
|
|
|
use Joomla\Utilities\ArrayHelper;
|
|
|
|
/**
|
|
* ###Component### Model for ###SViews###
|
|
*/
|
|
class ###Component###Model###SViews### extends JModelList
|
|
{
|
|
/**
|
|
* Model user data.
|
|
*
|
|
* @var strings
|
|
*/
|
|
protected $user;
|
|
protected $userId;
|
|
protected $guest;
|
|
protected $groups;
|
|
protected $levels;
|
|
protected $app;
|
|
protected $input;
|
|
protected $uikitComp;
|
|
|
|
/**
|
|
* Method to build an SQL query to load the list data.
|
|
*
|
|
* @return string An SQL query
|
|
*/
|
|
protected function getListQuery()
|
|
{
|
|
// Get the current user for authorisation checks
|
|
$this->user = JFactory::getUser();
|
|
$this->userId = $this->user->get('id');
|
|
$this->guest = $this->user->get('guest');
|
|
$this->groups = $this->user->get('groups');
|
|
$this->authorisedGroups = $this->user->getAuthorisedGroups();
|
|
$this->levels = $this->user->getAuthorisedViewLevels();
|
|
$this->app = JFactory::getApplication();
|
|
$this->input = $this->app->input;
|
|
$this->initSet = true; ###SITE_GET_LIST_QUERY###
|
|
}
|
|
|
|
/**
|
|
* Method to get an array of data items.
|
|
*
|
|
* @return mixed An array of data items on success, false on failure.
|
|
*/
|
|
public function getItems()
|
|
{
|
|
$user = JFactory::getUser();###USER_PERMISSION_CHECK_ACCESS######LICENSE_LOCKED_CHECK######SITE_BEFORE_GET_ITEMS###
|
|
// load parent items
|
|
$items = parent::getItems();
|
|
|
|
// Get the global params
|
|
$globalParams = JComponentHelper::getParams('com_###component###', true);###SITE_GET_ITEMS######SITE_AFTER_GET_ITEMS###
|
|
|
|
// return items
|
|
return $items;
|
|
}###LICENSE_LOCKED_SET_BOOL######SITE_CUSTOM_METHODS######SITE_CUSTOM_BUTTONS_METHOD###
|
|
}
|