예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function getProperty($property, $root = null)
 {
     if ($this->cache === null) {
         $translatableFields = $this->getClassMetadata()->getFieldNames();
         $translationFields = $this->getEntityManager()->getClassMetadata($this->getClassMetadata()->getAssociationMapping('translations')['targetEntity'])->getFieldNames();
         $this->cache = array_diff($translationFields, $translatableFields);
     }
     if (in_array($property, $this->cache, true)) {
         $root = $this->getTranslationAlias($root);
     }
     return parent::getProperty($property, $root);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function getProperty($field)
 {
     return $this->repository->getProperty($field, $this->queryBuilder);
 }