Release of v4.0.1-alpha6

Add new subform classes. Fix registry class methods return type. Update all list and custom fields to use the new layouts.
This commit is contained in:
2024-06-28 03:50:30 +02:00
parent 5a2e137f31
commit 017d6a6299
92 changed files with 1692 additions and 469 deletions

View File

@@ -148,24 +148,25 @@ class ServersField extends ListField
*/
protected function getOptions()
{
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','name', 'protocol')));
$query->from($db->quoteName('#__componentbuilder_server', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = Html::_('select.option', '', 'Select an option');
foreach($items as $item)
{
$item->protocol = ($item->protocol == 2) ? Text::_('SFTP') : Text::_('FTP');
$options[] = Html::_('select.option', $item->id, $item->name.' ['.$item->protocol.']');
}
}
return $options;
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name','a.protocol'),array('id','name', 'protocol')));
$query->from($db->quoteName('#__componentbuilder_server', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = Html::_('select.option', '', 'Select an option');
foreach($items as $item)
{
$item->protocol = ($item->protocol == 2) ? Text::_('SFTP') : Text::_('FTP');
$options[] = Html::_('select.option', $item->id, $item->name.' ['.$item->protocol.']');
}
}
return $options;
}
}