/** * Checks passed identifier and locale against those in route * * @param RouteInterface $route * @param $locale * @param $id * * @return bool */ protected function hasRouteSameLocaleAndId(RouteInterface $route, $locale, $id) { return $route->getIdentifier()->getId() === $id && $route->getLocale() === $locale; }
/** * {@inheritdoc} */ public function generate(RouteInterface $resource) { $this->defaults['id'] = $resource->getIdentifier()->getId(); $this->defaults['_locale'] = $resource->getLocale(); return new SymfonyRoute($this->getPath($resource), $this->defaults, $this->requirements, $this->options); }