Updating modules/cms/formwidgets
This commit is contained in:
parent
e9ce6f5d54
commit
2f04fcd524
|
|
@ -30,8 +30,9 @@ class Components extends FormWidgetBase
|
||||||
{
|
{
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
if (!isset($this->model->settings['components']))
|
if (!isset($this->model->settings['components'])) {
|
||||||
return $result;
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
$manager = ComponentManager::instance();
|
$manager = ComponentManager::instance();
|
||||||
$manager->listComponents();
|
$manager->listComponents();
|
||||||
|
|
@ -47,11 +48,11 @@ class Components extends FormWidgetBase
|
||||||
$plugin = $manager->findComponentPlugin($componentObj);
|
$plugin = $manager->findComponentPlugin($componentObj);
|
||||||
if ($plugin) {
|
if ($plugin) {
|
||||||
$pluginDetails = $plugin->pluginDetails();
|
$pluginDetails = $plugin->pluginDetails();
|
||||||
if (isset($pluginDetails['icon']))
|
if (isset($pluginDetails['icon'])) {
|
||||||
$componentObj->pluginIcon = $pluginDetails['icon'];
|
$componentObj->pluginIcon = $pluginDetails['icon'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} catch (Exception $ex) {
|
||||||
catch (Exception $ex) {
|
|
||||||
$componentObj = new UnknownComponent(null, $properties, $ex->getMessage());
|
$componentObj = new UnknownComponent(null, $properties, $ex->getMessage());
|
||||||
$componentObj->alias = $alias;
|
$componentObj->alias = $alias;
|
||||||
$componentObj->pluginIcon = 'icon-bug';
|
$componentObj->pluginIcon = 'icon-bug';
|
||||||
|
|
@ -82,4 +83,4 @@ class Components extends FormWidgetBase
|
||||||
{
|
{
|
||||||
return ComponentHelpers::getComponentPropertyValues($component);
|
return ComponentHelpers::getComponentPropertyValues($component);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue