10 defined(
'JPATH_PLATFORM') or die;
29 protected $type =
'Plugins';
48 public function __get($name)
56 return parent::__get($name);
69 public function __set($name, $value)
74 $this->$name = (string) $value;
78 parent::__set($name, $value);
96 public function setup(SimpleXMLElement $element, $value, $group = null)
98 $return = parent::setup($element, $value, $group);
102 $this->folder = (string) $this->element[
'folder'];
115 protected function getOptions()
117 $folder = $this->folder;
123 $query = $db->getQuery(
true)
124 ->select(
'element AS value, name AS text')
125 ->from(
'#__extensions')
126 ->where(
'folder = ' . $db->quote($folder))
127 ->where(
'enabled = 1')
128 ->order(
'ordering, name');
129 $db->setQuery($query);
131 $options = $db->loadObjectList();
135 foreach ($options as $i => $item)
137 $source = JPATH_PLUGINS .
'/' . $folder .
'/' . $item->value;
138 $extension =
'plg_' . $folder .
'_' . $item->value;
139 $lang->load($extension .
'.sys', JPATH_ADMINISTRATOR, null,
false,
false)
140 || $lang->load($extension .
'.sys', $source, null,
false,
false)
141 || $lang->load($extension .
'.sys', JPATH_ADMINISTRATOR, $lang->getDefault(),
false,
false)
142 || $lang->load($extension .
'.sys', $source, $lang->getDefault(),
false,
false);
143 $options[$i]->text =
JText::_($item->text);
152 $options = array_merge(parent::getOptions(), $options);