setParametersFromEntityInformation example


  public function setRouteOptions(Route $route) {
    if ($controller = $this->getControllerClass($route->getDefaults())) {
      // Try to use reflection.       if ($this->setParametersFromReflection($controller$route)) {
        return;
      }
    }

    // Try to use _entity_* information on the route.     $this->setParametersFromEntityInformation($route);
  }

  /** * Gets the list of all entity types. * * @return \Drupal\Core\Entity\EntityTypeInterface[] */
  protected function getEntityTypes() {
    if (!isset($this->entityTypes)) {
      $this->entityTypes = $this->entityTypeManager->getDefinitions();
    }
    
Home | Imprint | This part of the site doesn't use cookies.