Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function buildView(BlockView $view, BlockInterface $block, array $options)
 {
     BlockUtils::processUrl($view, $options, true);
     if (!empty($options['text'])) {
         $view->vars['text'] = $options['text'];
     }
     if (!empty($options['icon'])) {
         $view->vars['icon'] = $options['icon'];
     }
 }
Exemplo n.º 2
0
 public function testProcessUrlWithPrefixAndPathAndRoute()
 {
     $view = new BlockView();
     BlockUtils::processUrl($view, ['test_path' => 'http://example.com', 'test_route_name' => 'test_route', 'test_route_parameters' => ['foo' => 'bar']], false, 'test');
     $this->assertEquals('http://example.com', $view->vars['test_path']);
     $this->assertArrayNotHasKey('test_route_name', $view->vars);
     $this->assertArrayNotHasKey('test_route_parameters', $view->vars);
 }
 /**
  * {@inheritdoc}
  */
 public function finishView(BlockView $view, BlockInterface $block, array $options)
 {
     BlockUtils::registerPlugin($view, 'taggable_datagrid');
 }