/**
  * @param string $pathinfo
  * @return boolean
  */
 public function match($pathinfo)
 {
     if (null !== $this->parent) {
         return $this->parent->match($pathinfo);
     }
     return parent::match($pathinfo);
 }
 /**
  * Update navigation history with route names and parameters
  *
  * @param QueryBag $queries
  */
 protected function updateNavigationHistory(QueryBag $queries)
 {
     $queryBuilder = $this->em->getRepository('OroNavigationBundle:NavigationHistoryItem')->createQueryBuilder('h')->select('h.id, h.url');
     $paginator = new Paginator($queryBuilder, false);
     foreach ($paginator as $navItem) {
         try {
             $url = str_replace('app_dev.php/', '', $navItem['url']);
             $routeData = $this->router->match($url);
             $entityId = isset($routeData['id']) ? (int) $routeData['id'] : null;
             $route = $routeData['_route'];
             unset($routeData['_controller'], $routeData['id'], $routeData['_route']);
             $queries->addPostQuery(sprintf('UPDATE oro_navigation_history ' . 'SET route = \'%s\', entity_id = %d, route_parameters=\'%s\' WHERE id = %d', $route, $entityId, serialize($routeData), $navItem['id']));
         } catch (\RuntimeException $e) {
             $queries->addPostQuery(sprintf('UPDATE oro_navigation_history SET route_parameters = \'%s\' WHERE id=%d', serialize([]), $navItem['id']));
         }
     }
 }
Exemple #3
0
 /**
  * {@inheritdoc}
  */
 public function match($pathinfo)
 {
     $this->setApiVersion();
     return parent::match($pathinfo);
 }
 /**
  * {@inheritdoc}
  */
 public function match($pathinfo)
 {
     $match = parent::match($pathinfo);
     $this->setMatchContext($match);
     return $match;
 }
 /**
  * {@inheritdoc}
  */
 public function match($url)
 {
     return $this->matchI18n(parent::match($url), $url);
 }
Exemple #6
0
 /**
  * @param string $pathinfo
  * @return array
  */
 public function match($pathinfo)
 {
     $match = parent::match($pathinfo);
     return $this->processMatch($match);
 }