Beispiel #1
0
 private function buildUrls()
 {
     foreach ($this->nodes as $node) {
         $url = parent::getPath($node);
         if ($node->url != $url) {
             $node->url = $url;
             $node->language = $this->language->getCurrent();
             $this->repository->persist($node);
         }
     }
     $this->cache->save($this->language->getCurrent()->id, true, [Cache::TAGS => [get_called_class()]]);
 }
Beispiel #2
0
 /**
  * @return Language
  */
 public function getLanguage()
 {
     return $this->current->getLanguage();
 }
Beispiel #3
0
 /**
  * @param Fluent $statement
  * @param $table
  */
 private function modifyStatement(Fluent $statement, $table)
 {
     $statement->select('t.*')->leftJoin('%n t', $this->mapper->getTranslationsTable($table))->on('t.%n = %n.%n', $this->mapper->getTranslationsColumn($table), $table, $this->mapper->getPrimaryKey($table))->where('language_id = %s', $this->language->getLanguage()->id);
 }