popups.php
940 Bytes
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
<?php
defined('JPATH_PLATFORM') or die;
JFormHelper::loadFieldClass('list');
class JFormFieldPopups extends JFormFieldList
{
/**
* The form field type.
*
* @var string
*
* @since 11.1
*/
protected $type = 'Popups';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options
*
* @since 11.4
*/
protected function getOptions()
{
$extensions = JcePluginsHelper::getExtensions('popups');
$options = array();
foreach ($extensions as $item) {
$option = new StdClass;
$option->text = JText::_($item->title, true);
$option->disable = '';
$option->value = $item->name;
$options[] = $option;
}
// Merge any additional options in the XML definition.
return array_merge(parent::getOptions(), $options);
}
}