2016-01-30 20:28:43 +00:00
|
|
|
<?php
|
2018-08-07 13:27:08 +00:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// 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');
|
|
|
|
|
2020-10-21 03:10:19 +00:00
|
|
|
###ADMIN_VIEWS_MODEL_HEADER###
|
2020-05-21 23:38:20 +00:00
|
|
|
|
2016-01-30 20:28:43 +00:00
|
|
|
/**
|
|
|
|
* ###Views### Model
|
|
|
|
*/
|
|
|
|
class ###Component###Model###Views### extends JModelList
|
|
|
|
{
|
|
|
|
public function __construct($config = array())
|
|
|
|
{
|
|
|
|
if (empty($config['filter_fields']))
|
|
|
|
{
|
|
|
|
$config['filter_fields'] = array(
|
|
|
|
###FILTER_FIELDS###
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
parent::__construct($config);
|
2017-03-02 00:55:04 +00:00
|
|
|
}###ADMIN_CUSTOM_BUTTONS_METHOD_LIST###
|
2020-11-19 03:07:18 +00:00
|
|
|
|
2016-01-30 20:28:43 +00:00
|
|
|
/**
|
|
|
|
* Method to auto-populate the model state.
|
|
|
|
*
|
2020-11-19 03:07:18 +00:00
|
|
|
* Note. Calling getState in this method will result in recursion.
|
|
|
|
*
|
|
|
|
* @param string $ordering An optional ordering field.
|
|
|
|
* @param string $direction An optional direction (asc|desc).
|
|
|
|
*
|
2016-01-30 20:28:43 +00:00
|
|
|
* @return void
|
2020-11-19 03:07:18 +00:00
|
|
|
*
|
2016-01-30 20:28:43 +00:00
|
|
|
*/
|
|
|
|
protected function populateState($ordering = null, $direction = null)
|
|
|
|
{
|
|
|
|
$app = JFactory::getApplication();
|
|
|
|
|
|
|
|
// Adjust the context to support modal layouts.
|
|
|
|
if ($layout = $app->input->get('layout'))
|
|
|
|
{
|
|
|
|
$this->context .= '.' . $layout;
|
2020-11-19 03:07:18 +00:00
|
|
|
}###POPULATESTATE###
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// List state information.
|
|
|
|
parent::populateState($ordering, $direction);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Method to get an array of data items.
|
|
|
|
*
|
|
|
|
* @return mixed An array of data items on success, false on failure.
|
|
|
|
*/
|
|
|
|
public function getItems()
|
2018-09-11 20:28:17 +00:00
|
|
|
{###LICENSE_LOCKED_CHECK######CHECKINCALL###
|
2016-01-30 20:28:43 +00:00
|
|
|
// load parent items
|
2018-09-11 20:28:17 +00:00
|
|
|
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX######SELECTIONTRANSLATIONFIX######GET_ITEMS_METHOD_AFTER_ALL###
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
// return items
|
|
|
|
return $items;
|
|
|
|
}###SELECTIONTRANSLATIONFIXFUNC###
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Method to build an SQL query to load the list data.
|
|
|
|
*
|
|
|
|
* @return string An SQL query
|
|
|
|
*/
|
|
|
|
protected function getListQuery()
|
|
|
|
{###LICENSE_LOCKED_CHECK###
|
|
|
|
###LISTQUERY###
|
2018-09-11 20:28:17 +00:00
|
|
|
}###MODELEXPORTMETHOD######LICENSE_LOCKED_SET_BOOL###
|
2016-01-30 20:28:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Method to get a store id based on model configuration state.
|
|
|
|
*
|
|
|
|
* @return string A store id.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
protected function getStoreId($id = '')
|
|
|
|
{
|
|
|
|
###STOREDID###
|
|
|
|
|
|
|
|
return parent::getStoreId($id);
|
|
|
|
}###AUTOCHECKIN###
|
|
|
|
}
|