public function getAncestors(ConfigurationInterface $configuration, $included = false)
    {
        $ancestors = [];

        if ($included) {
            $ancestors[$configuration->getResourceName()] = $configuration;
        }

        while (null !== $configuration->getParentId()) {
            $configuration = $this->findConfiguration($configuration->getParentId());
            $ancestors[$configuration->getResourceName()] = $configuration;
        }

        return array_reverse($ancestors);
    }
public function getAncestors(ConfigurationInterface $configuration, $included = false)
    {
        $ancestors = [];

        if ($included) {
            $ancestors[$configuration->getResourceName()] = $configuration;
        }

        while (null !== $configuration->getParentId()) {
            $configuration = $this->findConfiguration($configuration->getParentId());
            $ancestors[$configuration->getResourceName()] = $configuration;
        }

        return array_reverse($ancestors);
    }
public function getAncestors ( ConfigurationInterface $ configuration , $ included = false ) { $ ancestors = [ ] ; if ( $ included ) { $ ancestors [ $ configuration -> getResourceName ( ) ] = $ configuration ; } while ( null !== $ configuration -> getParentId ( ) ) { $ configuration = $ this -> findConfiguration ( $ configuration -> getParentId ( ) ) ; $ ancestors [ $ configuration -> getResourceName ( ) ] = $ configuration ; } return array_reverse ( $ ancestors ) ; }
Returns all the ancestors configuration.

@param ConfigurationInterface $configuration
@param bool                   $included

@return ConfigurationInterface[]
Returns all the ancestors configuration .