Release of v5.1.1-alpha2

Adds the ModalSelect fieldtype to Joomla Component Builder - J5. Adds the Data Import Function to the Demo Component. Adds new country related tables and fields to the Demo Component. Resolves the Database Updating issue in the compiler. #1212,#1209. Adds the Component Commands Plugin to the CLI for Import of spreadsheet data-sets.
This commit is contained in:
2025-03-28 13:15:25 +00:00
parent 06185f8c3a
commit 8342c5bb9f
536 changed files with 16369 additions and 2067 deletions

View File

@ -42,27 +42,24 @@ class AdminviewsField extends ListField
*/
protected function getOptions()
{
// Get the database object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.system_name'),array('guid','adminview_system_name')));
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = [];
if ($items)
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.system_name'),array('guid','view_table_system_name')));
$query->from($db->quoteName('#__componentbuilder_admin_view', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.system_name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
$options[] = Html::_('select.option', '', 'Select an option');
foreach($items as $item)
{
if ($this->multiple === false)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
}
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->guid, $item->adminview_system_name);
}
$options[] = Html::_('select.option', $item->guid, $item->view_table_system_name);
}
return $options;
}
return $options;
}
}