widgets() публичный Метод

Renders a particular widget type on the given location.
public widgets ( string $location = null, string $zone = Zone::FRONTEND, string $wrapper = 'widgetwrapper.twig' ) : string | Twig_Markup
$location string Location (e.g. 'dashboard_aside_top')
$zone string Either Zone::FRONTEND or Zone::BACKEND
$wrapper string
Результат string | Twig_Markup
Пример #1
0
 public function testWidgetNoLocationStrict()
 {
     $app = $this->getApp();
     $app['config']->set('general/strict_variables', true);
     $handler = new WidgetHandler($app);
     $widget = (new Widget())->setZone('frontend')->setLocation('gum-tree')->setContent('<blink>Drop Bear Warning!</blink>');
     $this->setExpectedException('InvalidArgumentException', 'widgets() requires a location, none given');
     $app['asset.queue.widget']->add($widget);
     $handler->widgets();
 }