示例#1
0
 /**
  * @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']];
 }