Skip to content
This repository has been archived by the owner on Feb 17, 2020. It is now read-only.

Commit

Permalink
- Moved container creation to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
akadlec committed Jun 20, 2015
1 parent b5fa357 commit d0a84d7
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/IPub/Widgets/Components/Control.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public function __construct(
// Extension managers
$this->widgetsManager = $widgetsManager;
$this->decoratorsManager = $decoratorsManager;

// Register widgets container
$this->addComponent(new ComponentModel\Container(), 'widgets');
}

/**
Expand All @@ -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');

Expand Down Expand Up @@ -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
*
Expand Down

0 comments on commit d0a84d7

Please sign in to comment.