Release of v5.0.1-alpha3

Add in JCB gitea push feature to help maintain JCB core features. Add extending options to interfaces.
This commit is contained in:
2024-06-05 17:08:34 +02:00
parent aba1267f8e
commit 0c9a098335
40 changed files with 1642 additions and 672 deletions

View File

@@ -153,7 +153,7 @@ class InterfacepowersField extends ListField
// Get the databse object.
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','implements_name','system_name','type','version')));
$query->select($db->quoteName(array('a.guid','a.name','a.system_name','a.type','a.power_version'),array('guid','extendsinterfaces_name','system_name','type','version')));
$query->from($db->quoteName('#__componentbuilder_power', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->where($db->quoteName('a.type') . ' = ' . $db->quote('interface'));
@@ -181,8 +181,11 @@ class InterfacepowersField extends ListField
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
// set the other option to enter text
$options[] = Html::_('select.option', -1, Text::_('COM_COMPONENTBUILDER_SET_CUSTOM'));
// if none was found, we add this to set an alternative to set custom
if (!$items)
{
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NONE_FOUND'));
}
if ($items)
{
if ($this->multiple === false)
@@ -191,9 +194,11 @@ class InterfacepowersField extends ListField
}
foreach($items as $item)
{
$options[] = Html::_('select.option', $item->guid, $item->system_name . ' (v' . $item->version . ') [' . $item->type . ' ' . $item->implements_name . ']');
$options[] = Html::_('select.option', $item->guid, $item->system_name . ' [' . $item->type . ' ' . $item->extendsinterfaces_name . '] (v' . $item->version . ')');
}
}
// set the other option to enter text
$options[] = Html::_('select.option', -1, Text::_('COM_COMPONENTBUILDER_SET_CUSTOM'));
return $options;
}
}