From 2f04fcd52431a744e7d01c3db0a065a972bf2d6c Mon Sep 17 00:00:00 2001 From: Stefan Talen Date: Sat, 11 Oct 2014 01:29:22 +0200 Subject: [PATCH] Updating modules/cms/formwidgets --- modules/cms/formwidgets/Components.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/cms/formwidgets/Components.php b/modules/cms/formwidgets/Components.php index a3f6014c0..13b6111ef 100644 --- a/modules/cms/formwidgets/Components.php +++ b/modules/cms/formwidgets/Components.php @@ -30,8 +30,9 @@ class Components extends FormWidgetBase { $result = []; - if (!isset($this->model->settings['components'])) + if (!isset($this->model->settings['components'])) { return $result; + } $manager = ComponentManager::instance(); $manager->listComponents(); @@ -47,11 +48,11 @@ class Components extends FormWidgetBase $plugin = $manager->findComponentPlugin($componentObj); if ($plugin) { $pluginDetails = $plugin->pluginDetails(); - if (isset($pluginDetails['icon'])) + if (isset($pluginDetails['icon'])) { $componentObj->pluginIcon = $pluginDetails['icon']; + } } - } - catch (Exception $ex) { + } catch (Exception $ex) { $componentObj = new UnknownComponent(null, $properties, $ex->getMessage()); $componentObj->alias = $alias; $componentObj->pluginIcon = 'icon-bug'; @@ -82,4 +83,4 @@ class Components extends FormWidgetBase { return ComponentHelpers::getComponentPropertyValues($component); } -} \ No newline at end of file +}