Bridge/Doctrine/ORM/Source/EntitySource.php
public function setQueryBuilderInitializer(\Closure $initializer = null)
    {
        if (!is_null($initializer)) {
            $this->validateQueryBuilderInitializer($initializer);
        }

        $this->queryBuilderInitializer = $initializer;

        return $this;
    }
public function setQueryBuilderInitializer(\Closure $initializer = null)
    {
        if (!is_null($initializer)) {
            $this->validateQueryBuilderInitializer($initializer);
        }

        $this->queryBuilderInitializer = $initializer;

        return $this;
    }
public function setQueryBuilderInitializer ( \ Closure $ initializer = null ) { if ( ! is_null ( $ initializer ) ) { $ this -> validateQueryBuilderInitializer ( $ initializer ) ; } $ this -> queryBuilderInitializer = $ initializer ; return $ this ; }
Sets the query builder initializer.

A closure with the query builder as first argument
and the root alias as the second argument:

function (QueryBuilder $qb, $alias) {

}

@param \Closure|null $initializer

@return EntitySource
Sets the query builder initializer .