/** * @param FieldableEntity|Node $entity * @param array $options * * @return array */ public function getTemplateOptions($entity, array $options) { if (!$entity) { return []; } $route = $entity->getRoute(); $url = $this->router->generate($route->getName(), []); return ['url' => $url, 'text' => $entity->getTitle(), 'new_tab' => $options['new_tab'], 'follow' => $options['follow']]; }
function __construct() { parent::__construct(); $this->urls = new ArrayCollection(); $this->tags = new ArrayCollection(); }