protected function addToComponentTreeSubset(array &$pointer, $componentId)
    {
        foreach ($this->graphComponents[$componentId]['path'] as $node) {
            if (empty($pointer[$node])) {
                $pointer[$node] = [];
            }
            $pointer =& $pointer[$node];
        }
        $pointer[] = $componentId;

        if ($this->graphComponents[$componentId]['master']) {
            $dependencies = array_column($this->graphComponents[$componentId]['master']['dependencies'], 'class');
            foreach ($this->graphComponents[$componentId]['master']['variants'] as $variant) {
                $dependencies = array_column($variant['dependencies'], 'class');
            }
        } else {
            $dependencies = array_column($this->graphComponents[$componentId]['dependencies'], 'class');
        }

        return array_unique($dependencies);
    }
protected function addToComponentTreeSubset(array &$pointer, $componentId)
    {
        foreach ($this->graphComponents[$componentId]['path'] as $node) {
            if (empty($pointer[$node])) {
                $pointer[$node] = [];
            }
            $pointer =& $pointer[$node];
        }
        $pointer[] = $componentId;

        if ($this->graphComponents[$componentId]['master']) {
            $dependencies = array_column($this->graphComponents[$componentId]['master']['dependencies'], 'class');
            foreach ($this->graphComponents[$componentId]['master']['variants'] as $variant) {
                $dependencies = array_column($variant['dependencies'], 'class');
            }
        } else {
            $dependencies = array_column($this->graphComponents[$componentId]['dependencies'], 'class');
        }

        return array_unique($dependencies);
    }
protected function addToComponentTreeSubset ( array & $ pointer , $ componentId ) { foreach ( $ this -> graphComponents [ $ componentId ] [ 'path' ] as $ node ) { if ( empty ( $ pointer [ $ node ] ) ) { $ pointer [ $ node ] = [ ] ; } $ pointer = & $ pointer [ $ node ] ; } $ pointer [ ] = $ componentId ; if ( $ this -> graphComponents [ $ componentId ] [ 'master' ] ) { $ dependencies = array_column ( $ this -> graphComponents [ $ componentId ] [ 'master' ] [ 'dependencies' ] , 'class' ) ; foreach ( $ this -> graphComponents [ $ componentId ] [ 'master' ] [ 'variants' ] as $ variant ) { $ dependencies = array_column ( $ variant [ 'dependencies' ] , 'class' ) ; } } else { $ dependencies = array_column ( $ this -> graphComponents [ $ componentId ] [ 'dependencies' ] , 'class' ) ; } return array_unique ( $ dependencies ) ; }
Recursively add a single component to a component tree subset

@param array $pointer      Component tree subset
@param string $componentId Component class

@return array Component dependencies
Recursively add a single component to a component tree subset