/
imagetypes.php
55 lines (42 loc) · 1.23 KB
/
imagetypes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* @package Sven.Bluege
* @subpackage com_eventgallery
*
* @copyright Copyright (C) 2005 - 2013 Sven Bluege All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
jimport( 'joomla.application.component.modellist' );
class EventgalleryModelImagetypes extends JModelList
{
protected $context = '';
function __construct()
{
parent::__construct();
}
/**
* Returns the query
* @return string The query to be used to retrieve the rows from the database
*/
function getListQuery()
{
// Create a new query object.
$db = $this->getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from('#__eventgallery_imagetype');
return $query;
}
protected function _getList($query, $limitstart = 0, $limit = 0)
{
$this->_db->setQuery($query, $limitstart, $limit);
$result = $this->_db->loadObjectList();
$objects = array();
foreach($result as $item) {
array_push($objects, new EventgalleryLibraryImagetype($item->id));
}
return $objects;
}
}