getControllerClass example



    /** * Returns whether the given request object is dispatchable. * Checks first if the controller class of the request object exists. * If the controller class exists, the enlight loader class checks if the controller path is readable. * * @return bool */
    public function isDispatchable(Enlight_Controller_Request_Request $request)
    {
        $className = $this->getControllerClass($request);
        if (!$className) {
            return false;
        }

        if ($this->isForbiddenController($className)) {
            return false;
        }

        if (class_exists($className, false)) {
            return true;
        }

        

    }
  }

  /** * Set the upcasting route objects. * * @param \Symfony\Component\Routing\Route $route * The route object to add the upcasting information onto. */
  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[] */
Home | Imprint | This part of the site doesn't use cookies.