getSelect() public method

Returns the select statement for this field without the alias.
public getSelect ( ) : string
return string
Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getStatement(QueryBuilder $queryBuilder)
 {
     $paramName = $this->getFieldName() . $this->getUniqueId();
     $values = $this->filterNullValues($this->getValues());
     $statement = '';
     if (count($values) > 0) {
         $queryBuilder->setParameter($paramName, $values);
         $statement = $this->field->getSelect() . ' IN (:' . $paramName . ')';
         if (array_search(null, $this->getValues())) {
             $statement .= ' OR ' . $this->field->getSelect() . ' IS NULL';
         }
     } elseif (array_search(null, $this->getValues())) {
         // only null in values array
         $statement .= $paramName . ' IS NULL';
     }
     return $statement;
 }
 /**
  * {@inheritdoc}
  */
 public function getWhere()
 {
     return $this->fieldDescriptor->getSelect();
 }