2021-03-05 03:08:47 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @package Joomla.Component.Builder
|
|
|
|
*
|
|
|
|
* @created 30th April, 2015
|
2024-03-02 20:10:30 +00:00
|
|
|
* @author Llewellyn van der Merwe <https://dev.vdm.io>
|
|
|
|
* @git Joomla Component Builder <https://git.vdm.dev/joomla/Component-Builder>
|
2021-03-05 03:08:47 +00:00
|
|
|
* @copyright Copyright (C) 2015 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');
|
|
|
|
|
|
|
|
###ADMIN_VIEWS_MODEL_HEADER###
|
|
|
|
|
|
|
|
/**
|
2022-05-25 08:30:55 +00:00
|
|
|
* ###Views### List Model
|
2021-03-05 03:08:47 +00:00
|
|
|
*/
|
2022-05-25 08:30:55 +00:00
|
|
|
class ###Component###Model###Views### extends ListModel
|
2021-03-05 03:08:47 +00:00
|
|
|
{
|
2024-03-02 20:10:30 +00:00
|
|
|
public function __construct($config = [])
|
2021-03-05 03:08:47 +00:00
|
|
|
{
|
|
|
|
if (empty($config['filter_fields']))
|
2024-03-02 20:10:30 +00:00
|
|
|
{
|
2021-03-05 03:08:47 +00:00
|
|
|
$config['filter_fields'] = array(
|
|
|
|
###FILTER_FIELDS###
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
parent::__construct($config);
|
|
|
|
}###ADMIN_CUSTOM_BUTTONS_METHOD_LIST###
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Method to auto-populate the model state.
|
|
|
|
*
|
|
|
|
* 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).
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
protected function populateState($ordering = null, $direction = null)
|
|
|
|
{
|
2024-03-02 20:10:30 +00:00
|
|
|
$app = Factory::getApplication();
|
2021-03-05 03:08:47 +00:00
|
|
|
|
|
|
|
// Adjust the context to support modal layouts.
|
|
|
|
if ($layout = $app->input->get('layout'))
|
|
|
|
{
|
|
|
|
$this->context .= '.' . $layout;
|
|
|
|
}###POPULATESTATE###
|
|
|
|
|
|
|
|
// List state information.
|
|
|
|
parent::populateState($ordering, $direction);
|
|
|
|
}
|
2024-03-02 20:10:30 +00:00
|
|
|
|
2021-03-05 03:08:47 +00:00
|
|
|
/**
|
|
|
|
* Method to get an array of data items.
|
|
|
|
*
|
|
|
|
* @return mixed An array of data items on success, false on failure.
|
|
|
|
*/
|
|
|
|
public function getItems()
|
|
|
|
{###LICENSE_LOCKED_CHECK######CHECKINCALL###
|
|
|
|
// load parent items
|
|
|
|
$items = parent::getItems();###GET_ITEMS_METHOD_STRING_FIX######SELECTIONTRANSLATIONFIX######GET_ITEMS_METHOD_AFTER_ALL###
|
2024-03-02 20:10:30 +00:00
|
|
|
|
2021-03-05 03:08:47 +00:00
|
|
|
// return items
|
|
|
|
return $items;
|
|
|
|
}###SELECTIONTRANSLATIONFIXFUNC###
|
2024-03-02 20:10:30 +00:00
|
|
|
|
2021-03-05 03:08:47 +00:00
|
|
|
/**
|
|
|
|
* Method to build an SQL query to load the list data.
|
|
|
|
*
|
2024-03-02 20:10:30 +00:00
|
|
|
* @return string An SQL query
|
2021-03-05 03:08:47 +00:00
|
|
|
*/
|
|
|
|
protected function getListQuery()
|
|
|
|
{###LICENSE_LOCKED_CHECK###
|
|
|
|
###LISTQUERY###
|
|
|
|
}###MODELEXPORTMETHOD######LICENSE_LOCKED_SET_BOOL###
|
2024-03-02 20:10:30 +00:00
|
|
|
|
2021-03-05 03:08:47 +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###
|
|
|
|
}
|