Esempio n. 1
0
 public function generateFromRouteBasedLocation(RouteBasedLocation $location, $referenceType = self::ABSOLUTE_PATH)
 {
     switch ($location->getName()) {
         case 'root':
             return 'root_url';
             break;
         case 'node_1':
             return 'node_1_url';
             break;
         case 'node_2':
             return 'node_2_url';
             break;
         case 'node_2_1':
             return 'node_2_1_url';
             break;
         default:
             throw new \Exception("La ruta especificada no existe.");
     }
 }