/**
  * {@inheritdoc}
  */
 protected function prepareQuery(QueryBuilder $query, $rootAlias, $alias, $itemsType)
 {
     $entityId = $this->requestParams->get(self::ENTITY_PARAM, 0);
     $query->where($rootAlias . '.mode <> :mode');
     $query->setParameter('mode', ConfigModelManager::MODE_HIDDEN);
     $query->innerJoin($rootAlias . '.entity', 'ce', 'WITH', 'ce.id=' . $entityId);
     $query->addSelect('ce.id as entity_id');
     return parent::prepareQuery($query, $rootAlias, $alias, $itemsType);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function prepareQuery(QueryBuilder $query, $rootAlias, $alias, $itemsType)
 {
     $query->setParameter('entity_id', $this->parameters->get(self::ENTITY_PARAM, 0));
     return parent::prepareQuery($query, $rootAlias, $alias, $itemsType);
 }