isPublished() публичный Метод

Returns true if object is published.
public isPublished ( string $entityClass, string $id, string $locale ) : boolean
$entityClass string
$id string
$locale string
Результат boolean
Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getRouteByName($name)
 {
     if (strpos($name, self::ROUTE_PREFIX) !== 0) {
         throw new RouteNotFoundException();
     }
     $routeId = substr($name, strlen(self::ROUTE_PREFIX));
     if (array_key_exists($routeId, $this->symfonyRouteCache)) {
         return $this->symfonyRouteCache[$routeId];
     }
     /** @var RouteInterface $route */
     $route = $this->routeRepository->find($routeId);
     if (!$route || !$this->routeDefaultsProvider->supports($route->getEntityClass()) || !$this->routeDefaultsProvider->isPublished($route->getEntityClass(), $route->getEntityId(), $route->getLocale())) {
         throw new RouteNotFoundException();
     }
     return $this->createRoute($route, $this->requestStack->getCurrentRequest());
 }