/contentmanager/code/trunk/administrator/components/com_contentmanager/libraries/jxtended/form/fields/accesssection.php
https://bitbucket.org/eddieajau/the-art-of-joomla-archive · PHP · 49 lines · 20 code · 6 blank · 23 comment · 0 complexity · b66e0cbcd1a03efcf5f0fe058ff50316 MD5 · raw file
- <?php
- /**
- * @version $Id: accesssection.php 160 2009-07-09 00:06:09Z eddieajau $
- * @package JXtended.Libraries
- * @subpackage Form
- * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved.
- * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
- * @link http://jxtended.com
- */
- defined('JPATH_BASE') or die;
- jimport('joomla.html.html');
- jximport2('jxtended.form.field');
- jximport2('jxtended.form.fields.list');
- /**
- * JXtended Form Field Type Class for an Access Section.
- *
- * @package JXtended.Libraries
- * @subpackage Form
- * @version 1.0
- */
- class JXFieldTypeAccessSection extends JXFieldTypeList
- {
- /**
- * Field type
- *
- * @access protected
- * @var string
- */
- var $_type = 'AccessSection';
- function _getOptions(&$node)
- {
- // Get a database object.
- $db = &JFactory::getDBO();
- // Get the user groups from the database.
- $db->setQuery(
- 'SELECT `id` AS value, `title` AS text' .
- ' FROM `#__access_sections`' .
- ' ORDER BY `ordering`, `title` ASC'
- );
- $options = $db->loadObjectList();
- return $options;
- }
- }