forked from joomla/Component-Builder
Added custom getOptions back after the fix of the field area
This commit is contained in:
parent
a0890ea87f
commit
3002e093de
@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.7.3
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **182266**
|
||||
+ *Line count*: **182294**
|
||||
+ *Field count*: **1012**
|
||||
+ *File count*: **1199**
|
||||
+ *Folder count*: **193**
|
||||
|
@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
|
||||
+ *Version*: 2.7.3
|
||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
+ *Line count*: **182266**
|
||||
+ *Line count*: **182294**
|
||||
+ *Field count*: **1012**
|
||||
+ *File count*: **1199**
|
||||
+ *Folder count*: **193**
|
||||
|
@ -49,6 +49,20 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return null;
|
||||
// get custom folder files
|
||||
$localfolder = JPATH_COMPONENT_ADMINISTRATOR.'/views';
|
||||
// set the default
|
||||
$options = array();
|
||||
// import all needed classes
|
||||
jimport('joomla.filesystem.folder');
|
||||
// now check if there are files in the folder
|
||||
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
|
||||
{
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,20 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
|
||||
*/
|
||||
public function getOptions()
|
||||
{
|
||||
return null;
|
||||
// get custom folder files
|
||||
$localfolder = JPATH_COMPONENT_SITE.'/views';
|
||||
// set the default
|
||||
$options = array();
|
||||
// import all needed classes
|
||||
jimport('joomla.filesystem.folder');
|
||||
// now check if there are files in the folder
|
||||
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
|
||||
{
|
||||
foreach ($folders as $folder)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user