WellCommerce\Bundle\RoutingBundle\Entity\RouteInterface::getType PHP Method

getType() public method

public getType ( ) : string
return string
    public function getType() : string;

Usage Example

 /**
  * Creates a route
  *
  * @param RouteInterface $resource
  *
  * @return null|SymfonyRoute
  */
 private function createRoute(RouteInterface $resource)
 {
     $route = null;
     foreach ($this->generators->all() as $generator) {
         if ($generator->supports($resource->getType())) {
             $route = $generator->generate($resource);
             break;
         }
     }
     if (null === $route) {
         throw new RouteNotFoundException(sprintf('No possible generator found for route "%s"', $resource->getId()));
     }
     return $route;
 }
All Usage Examples Of WellCommerce\Bundle\RoutingBundle\Entity\RouteInterface::getType