Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getProperty($property, $root = null)
 {
     if ($this->cache === null) {
         $translationMetadata = $this->getEntityManager()->getClassMetadata($this->getClassMetadata()->getAssociationMapping('translations')['targetEntity']);
         $this->cache = array_diff($this->getProperties($translationMetadata), $this->getProperties($this->getClassMetadata()));
     }
     if (in_array($this->getRootProperty($property), $this->cache, true)) {
         $root = $this->getTranslationAlias($root);
     }
     return parent::getProperty($property, $root);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getProperty($field)
 {
     return $this->repository->getProperty($field, $this->queryBuilder);
 }