Source for file accesslevel.php

Documentation is available at accesslevel.php

  1. <?php
  2. /**
  3.  * @package    FrameworkOnFramework
  4.  * @subpackage form
  5.  * @copyright  Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
  6.  * @license    GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8. // Protect from unauthorized access
  9. defined('_JEXEC'or die;
  10.  
  11. /**
  12.  * Access level field header
  13.  *
  14.  * @package  FrameworkOnFramework
  15.  * @since    2.0
  16.  */
  17. {
  18.     /**
  19.      * Method to get the list of access levels
  20.      *
  21.      * @return  array    A list of access levels.
  22.      *
  23.      * @since   2.0
  24.      */
  25.     protected function getOptions()
  26.     {
  27.         $db JFactory::getDbo();
  28.         $query $db->getQuery(true);
  29.  
  30.         $query->select('a.id AS value, a.title AS text');
  31.         $query->from('#__viewlevels AS a');
  32.         $query->group('a.id, a.title, a.ordering');
  33.         $query->order('a.ordering ASC');
  34.         $query->order($query->qn('title'' ASC');
  35.  
  36.         // Get the options.
  37.         $db->setQuery($query);
  38.         $options $db->loadObjectList();
  39.  
  40.         return $options;
  41.     }
  42. }

Documentation generated on Tue, 19 Nov 2013 14:53:18 +0100 by phpDocumentor 1.4.3