You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.2 KiB
58 lines
1.2 KiB
<?php
|
|
/**
|
|
* @package Joomla.Administrator
|
|
* @subpackage com_foos
|
|
*
|
|
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
|
|
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
|
*/
|
|
|
|
namespace FooNamespace\Component\Foos\Administrator\Model;
|
|
|
|
\defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\MVC\Model\ListModel;
|
|
|
|
/**
|
|
* Methods supporting a list of foo records.
|
|
*
|
|
* @since __BUMP_VERSION__
|
|
*/
|
|
class FoosModel extends ListModel
|
|
{
|
|
/**
|
|
* Constructor.
|
|
*
|
|
* @param array $config An optional associative array of configuration settings.
|
|
*
|
|
* @see \JControllerLegacy
|
|
*
|
|
* @since __BUMP_VERSION__
|
|
*/
|
|
public function __construct($config = [])
|
|
{
|
|
parent::__construct($config);
|
|
}
|
|
/**
|
|
* Build an SQL query to load the list data.
|
|
*
|
|
* @return \JDatabaseQuery
|
|
*
|
|
* @since __BUMP_VERSION__
|
|
*/
|
|
protected function getListQuery()
|
|
{
|
|
// Create a new query object.
|
|
$db = $this->getDbo();
|
|
$query = $db->getQuery(true);
|
|
|
|
// Select the required fields from the table.
|
|
$query->select(
|
|
$db->quoteName(['id', 'name', 'alias'])
|
|
);
|
|
$query->from($db->quoteName('#__foos_details'));
|
|
|
|
return $query;
|
|
}
|
|
}
|