getLocale() public method

public getLocale ( ) : string
return string
 /**
  * {@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);
 }
 private function prepareRouteDefaults(RouteInterface $resource)
 {
     $this->defaults['id'] = $resource->getIdentifier()->getId();
     $this->defaults['_locale'] = $resource->getLocale();
 }
Ejemplo n.º 3
0
 /**
  * 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;
 }
Ejemplo n.º 4
0
 /**
  * Checks passed identifier and locale against those in route
  *
  * @param RouteInterface $route
  * @param                $locale
  * @param                $id
  *
  * @return bool
  */
 private function hasRouteSameLocaleAndId(RouteInterface $route, string $locale, $id) : bool
 {
     return $route->getIdentifier()->getId() === $id && $route->getLocale() === $locale;
 }