@copyright Copyright (C) 2015. All Rights Reserved @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html A sermon distributor that links to Dropbox. /----------------------------------------------------------------------------------------------------------------------------------*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); // import the list field type jimport('joomla.form.helper'); JFormHelper::loadFieldClass('list'); /** * Externalsourcefiles Form Field class for the Sermondistributor component */ class JFormFieldExternalsourcefiles extends JFormFieldList { /** * The externalsourcefiles field type. * * @var string */ public $type = 'externalsourcefiles'; /** * Method to get a list of options for a list input. * * @return array An array of JHtml options. */ public function getOptions() { // set the default $options[] = JHtml::_('select.option', '', JText::_('COM_SERMONDISTRIBUTOR_THE_LOCAL_LISTING_OF_THE_MANUAL_EXTERNAL_SOURCE_FOLDERS_IS_EMPTY')); $selection = SermondistributorHelper::getExternalSourceLink('manual', 2, false, 'select'); if (SermondistributorHelper::checkArray($selection)) { $options = array(); foreach ($selection as $key => $name) { $options[] = JHtml::_('select.option', $key, $name); } } return $options; } }