Exemplo n.º 1
0
 public function updatePathInfo(ContentInterface $content)
 {
     if (!$content->isChangedPathInfo()) {
         return;
     }
     $info = $this->getPathInfoFromMetaTagKey($content->getKeyword());
     $arr = $this->keyGenerator->splitLocaledKeyword($content->getKeyword());
     $contentInfo = $content->getPathInfo();
     $contentInfo['_locale'] = $arr[0];
     // add locale routing info after controller
     foreach ($info as $key => $value) {
         $contentInfo[$key] = $value;
     }
     $contentInfo = array_merge($contentInfo, $this->getQueryInfo($content->getKeyword()));
     $content->setChangedPathInfo($contentInfo);
     $content->setRouteDefaults($this->getDefaults($contentInfo['_route']));
 }