From d0a84d776166c84293385ee2f348313514c8ec36 Mon Sep 17 00:00:00 2001 From: Adam Kadlec Date: Sat, 20 Jun 2015 21:37:17 +0200 Subject: [PATCH] - Moved container creation to constructor --- src/IPub/Widgets/Components/Control.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/IPub/Widgets/Components/Control.php b/src/IPub/Widgets/Components/Control.php index 648eb18..ab2a880 100644 --- a/src/IPub/Widgets/Components/Control.php +++ b/src/IPub/Widgets/Components/Control.php @@ -95,6 +95,9 @@ public function __construct( // Extension managers $this->widgetsManager = $widgetsManager; $this->decoratorsManager = $decoratorsManager; + + // Register widgets container + $this->addComponent(new ComponentModel\Container(), 'widgets'); } /** @@ -112,9 +115,6 @@ protected function attached($presenter) return; } - // Register widgets container - $this->addComponent(new ComponentModel\Container(), 'widgets'); - // Register default raw widget decorator $this->setDecorator('raw'); @@ -192,6 +192,16 @@ public function setGroup($group) return $this; } + /** + * Get widgets group + * + * @return string + */ + public function getGroup() + { + return $this->group; + } + /** * Get all registered widgets in position *