Arrilot\Widgets\WidgetGroupCollection::group PHP Method

group() public method

Get the widget group object.
public group ( $name ) : Arrilot\Widgets\WidgetGroup
$name
return Arrilot\Widgets\WidgetGroup
    public function group($name)
    {
        if (isset($this->groups[$name])) {
            return $this->groups[$name];
        }
        $this->groups[$name] = new WidgetGroup($name, $this->app);
        return $this->groups[$name];
    }

Usage Example

 public function testItGrantsAccessToWidgetGroup()
 {
     $groupObject = $this->collection->group('sidebar');
     $expectedObject = new WidgetGroup('sidebar', new TestApplicationWrapper());
     $this->assertEquals($expectedObject, $groupObject);
 }
WidgetGroupCollection