/** * @param UrlGeneratorInterface $generator for the parent class * @param UrlGeneratorInterface $contentRouter to generate routes when * content is set * @param EventDispatcherInterface $dispatcher to dispatch the CREATE_ITEM_FROM_NODE event. * @param LoggerInterface $logger */ public function __construct(UrlGeneratorInterface $generator, UrlGeneratorInterface $contentRouter, EventDispatcherInterface $dispatcher, LoggerInterface $logger) { $this->generator = $generator; $this->contentRouter = $contentRouter; $this->linkTypes = ['route', 'uri', 'content']; $this->dispatcher = $dispatcher; $this->logger = $logger; parent::__construct(); }
public function __construct(UrlGeneratorInterface $generator) { trigger_error(__CLASS__ . ' is deprecated. Use Knp\\Menu\\Silex\\RoutingExtension instead.', E_USER_DEPRECATED); parent::__construct(); $this->addExtension(new RoutingExtension($generator)); }
public function __construct() { parent::__construct(); $this->addExtension(new CoreExtension(), -10); }