src/Bridge/Doctrine/Orm/PropertyHelperTrait.php
protected function addJoinsForNestedProperty(string $property, string $rootAlias, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator/*, string $resourceClass, string $joinType*/): array
    {
        if (\func_num_args() > 4) {
            $resourceClass = func_get_arg(4);
        } else {
            if (__CLASS__ !== \get_class($this)) {
                $r = new \ReflectionMethod($this, __FUNCTION__);
                if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
                    @trigger_error(sprintf('Method %s() will have a fifth `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
                }
            }
            $resourceClass = null;
        }

        if (\func_num_args() > 5) {
            $joinType = func_get_arg(5);
        } else {
            if (__CLASS__ !== \get_class($this)) {
                $r = new \ReflectionMethod($this, __FUNCTION__);
                if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
                    @trigger_error(sprintf('Method %s() will have a sixth `$joinType` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.3.', __FUNCTION__), E_USER_DEPRECATED);
                }
            }
            $joinType = null;
        }

        $propertyParts = $this->splitPropertyParts($property, $resourceClass);
        $parentAlias = $rootAlias;
        $alias = null;

        foreach ($propertyParts['associations'] as $association) {
            $alias = QueryBuilderHelper::addJoinOnce($queryBuilder, $queryNameGenerator, $parentAlias, $association, $joinType);
            $parentAlias = $alias;
        }

        if (null === $alias) {
            throw new InvalidArgumentException(sprintf('Cannot add joins for property "%s" - property is not nested.', $property));
        }

        return [$alias, $propertyParts['field'], $propertyParts['associations']];
    }
protected function addJoinsForNestedProperty(string $property, string $rootAlias, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator/*, string $resourceClass, string $joinType*/): array
    {
        if (\func_num_args() > 4) {
            $resourceClass = func_get_arg(4);
        } else {
            if (__CLASS__ !== \get_class($this)) {
                $r = new \ReflectionMethod($this, __FUNCTION__);
                if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
                    @trigger_error(sprintf('Method %s() will have a fifth `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.', __FUNCTION__), E_USER_DEPRECATED);
                }
            }
            $resourceClass = null;
        }

        if (\func_num_args() > 5) {
            $joinType = func_get_arg(5);
        } else {
            if (__CLASS__ !== \get_class($this)) {
                $r = new \ReflectionMethod($this, __FUNCTION__);
                if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
                    @trigger_error(sprintf('Method %s() will have a sixth `$joinType` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.3.', __FUNCTION__), E_USER_DEPRECATED);
                }
            }
            $joinType = null;
        }

        $propertyParts = $this->splitPropertyParts($property, $resourceClass);
        $parentAlias = $rootAlias;
        $alias = null;

        foreach ($propertyParts['associations'] as $association) {
            $alias = QueryBuilderHelper::addJoinOnce($queryBuilder, $queryNameGenerator, $parentAlias, $association, $joinType);
            $parentAlias = $alias;
        }

        if (null === $alias) {
            throw new InvalidArgumentException(sprintf('Cannot add joins for property "%s" - property is not nested.', $property));
        }

        return [$alias, $propertyParts['field'], $propertyParts['associations']];
    }
protected function addJoinsForNestedProperty ( string $ property , string $ rootAlias , QueryBuilder $ queryBuilder , QueryNameGeneratorInterface $ queryNameGenerator /*, string $resourceClass, string $joinType*/ ) : array { if ( \ func_num_args ( ) > 4 ) { $ resourceClass = func_get_arg ( 4 ) ; } else { if ( __CLASS__ !== \ get_class ( $ this ) ) { $ r = new \ ReflectionMethod ( $ this , __FUNCTION__ ) ; if ( __CLASS__ !== $ r -> getDeclaringClass ( ) -> getName ( ) ) { @ trigger_error ( sprintf ( 'Method %s() will have a fifth `$resourceClass` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.1.' , __FUNCTION__ ) , E_USER_DEPRECATED ) ; } } $ resourceClass = null ; } if ( \ func_num_args ( ) > 5 ) { $ joinType = func_get_arg ( 5 ) ; } else { if ( __CLASS__ !== \ get_class ( $ this ) ) { $ r = new \ ReflectionMethod ( $ this , __FUNCTION__ ) ; if ( __CLASS__ !== $ r -> getDeclaringClass ( ) -> getName ( ) ) { @ trigger_error ( sprintf ( 'Method %s() will have a sixth `$joinType` argument in version API Platform 3.0. Not defining it is deprecated since API Platform 2.3.' , __FUNCTION__ ) , E_USER_DEPRECATED ) ; } } $ joinType = null ; } $ propertyParts = $ this -> splitPropertyParts ( $ property , $ resourceClass ) ; $ parentAlias = $ rootAlias ; $ alias = null ; foreach ( $ propertyParts [ 'associations' ] as $ association ) { $ alias = QueryBuilderHelper :: addJoinOnce ( $ queryBuilder , $ queryNameGenerator , $ parentAlias , $ association , $ joinType ) ; $ parentAlias = $ alias ; } if ( null === $ alias ) { throw new InvalidArgumentException ( sprintf ( 'Cannot add joins for property "%s" - property is not nested.' , $ property ) ) ; } return [ $ alias , $ propertyParts [ 'field' ] , $ propertyParts [ 'associations' ] ] ; }
Adds the necessary joins for a nested property.

@throws InvalidArgumentException If property is not nested

@return array An array where the first element is the join $alias of the leaf entity,
the second element is the $field name
the third element is the $associations array
Adds the necessary joins for a nested property .