1 <?php
 2 /**
 3  * @package     Joomla.Libraries
 4  * @subpackage  Form
 5  *
 6  * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 7  * @license     GNU General Public License version 2 or later; see LICENSE.txt
 8  */
 9 
10 defined('JPATH_PLATFORM') or die;
11 
12 JFormHelper::loadFieldClass('list');
13 
14 /**
15  * Module Tag field.
16  *
17  * @since  3.0
18  */
19 class JFormFieldModuletag extends JFormFieldList
20 {
21     /**
22      * The form field type.
23      *
24      * @var    string
25      * @since  3.0
26      */
27     protected $type = 'ModuleTag';
28 
29     /**
30      * Method to get the field options.
31      *
32      * @return  array  The field option objects.
33      *
34      * @since   3.0
35      */
36     protected function getOptions()
37     {
38         $options = array();
39         $tags    = array('address', 'article', 'aside', 'details', 'div', 'footer', 'header', 'main', 'nav', 'section', 'summary');
40 
41         // Create one new option object for each tag
42         foreach ($tags as $tag)
43         {
44             $tmp = JHtml::_('select.option', $tag, $tag);
45             $options[] = $tmp;
46         }
47 
48         reset($options);
49 
50         return $options;
51     }
52 }
53