src/ActiveDoctrine/Entity/EntitySelector.php
/**
     * Eagerly load related entities with this query. A new
     * EntitySelector instance will be created which can be configured
     * with a supplied callback (including loading relations of those
     * entities).
     *
     * @param string       $relation The name of the relation
     * @param Closure|null $callback An optional callback for the resulting EntitySelector
     */
Eagerly load related entities with this query. A new
EntitySelector instance will be created which can be configured
with a supplied callback (including loading relations of those
entities).

@param string       $relation The name of the relation
@param Closure|null $callback An optional callback for the resulting EntitySelector
Eagerly load related entities with this query . A new EntitySelector instance will be created which can be configured with a supplied callback ( including loading relations of those entities ) . @param string $relation The name of the relation @param Closure|null $callback An optional callback for the resulting EntitySelector
public function with($relation, \Closure $callback = null)
    {
        if ($callback === null) {
            $callback = function () {};
        }
        $this->with[$relation] = $callback;
        return $this;
    }
public function with ( $ relation , \ Closure $ callback = null ) { if ( $ callback === null ) { $ callback = function ( ) { } ; } $ this -> with [ $ relation ] = $ callback ; return $ this ; }
Eagerly load related entities with this query.
Eagerly load related entities with this query .