/** * @param string $place * @param array $attributes * @param array $options * * @return string */ public function widgets($place, array $attributes = [], array $options = []) { $result = ''; foreach ($this->widgets->getWidgetsForPlace($place) as $controller) { $result .= $this->handler->render(new ControllerReference($controller, $attributes, []), 'hinclude', $options); } return $result; }
/** * @dataProvider getRegistrMethods * * @param string $method */ public function testRegistr($method) { $this->container->expects($this->once())->method($method)->will($this->returnValue('bar'))->with($this->place, 'AcmeDemoBundle:Welcome:index'); $this->assertEquals('bar', call_user_func([$this->event, $method], 'AcmeDemoBundle:Welcome:index')); }
/** * @param string $controller * * @return bool */ public function unregistr($controller) { return $this->container->unregistr($this->place, $controller); }