/** * Returns a concatenated path * * @param RouteInterface $resource * * @return string */ protected function getPath(RouteInterface $resource) : string { if (strlen($this->pattern)) { return $resource->getPath() . RouteGeneratorInterface::PATH_PARAMS_SEPARATOR . $this->pattern; } return $resource->getPath(); }
/** * {@inheritdoc} */ public function generate(RouteInterface $resource) { $this->defaults['id'] = $resource->getIdentifier()->getId(); $this->defaults['_locale'] = $resource->getLocale(); return new SymfonyRoute($resource->getPath(), $this->defaults, $this->requirements, $this->options); }
/** * Returns a concatenated path * * @param RouteInterface $resource * @param string $pattern * * @return string */ private function getPath(RouteInterface $resource, string $pattern) : string { if (strlen($pattern)) { return $resource->getPath() . self::PATH_PARAMS_SEPARATOR . $pattern; } return $resource->getPath(); }