Task/Generate/ComponentCollector.php
public function assembleComponentList($component_data) {
    // Reset all class properties. We don't normally run this twice, but
    // probably needed for tests.
    $this->requested_data_record = [];

    $this->component_collection = new \DrupalCodeBuilder\Generator\Collection\ComponentCollection;

    // Fiddly different handling for the type in the root component...
    $component_type = $component_data['base'];
    $component_data['component_type'] = $component_type;

    // The name for the root component is its root name, which will be the
    // name of the Drupal extension.
    $this->getComponentsFromData($component_data['root_name'], $component_data, NULL);

    return $this->component_collection;
  }
public function assembleComponentList($component_data) {
    // Reset all class properties. We don't normally run this twice, but
    // probably needed for tests.
    $this->requested_data_record = [];

    $this->component_collection = new \DrupalCodeBuilder\Generator\Collection\ComponentCollection;

    // Fiddly different handling for the type in the root component...
    $component_type = $component_data['base'];
    $component_data['component_type'] = $component_type;

    // The name for the root component is its root name, which will be the
    // name of the Drupal extension.
    $this->getComponentsFromData($component_data['root_name'], $component_data, NULL);

    return $this->component_collection;
  }
public function assembleComponentList ( $ component_data ) { // Reset all class properties. We don't normally run this twice, but // probably needed for tests. $ this -> requested_data_record = [ ] ; $ this -> component_collection = new \ DrupalCodeBuilder \ Generator \ Collection \ ComponentCollection ; // Fiddly different handling for the type in the root component... $ component_type = $ component_data [ 'base' ] ; $ component_data [ 'component_type' ] = $ component_type ; // The name for the root component is its root name, which will be the // name of the Drupal extension. $ this -> getComponentsFromData ( $ component_data [ 'root_name' ] , $ component_data , NULL ) ; return $ this -> component_collection ; }
Get the list of required components for an initial request.

This iterates down the tree of component requests: starting with the root
component, each component may request further components, and then those
components may request more, and so on.

Generator classes should implement requiredComponents() to return the list
of component types they require, possibly depending on incoming data.

Obviously, it's important that eventually this process terminate with
generators that return an empty array for requiredComponents().

@param $component_data
The requested component data.

@return \DrupalCodeBuilder\Generator\Collection\ComponentCollection
The collection of components.
Get the list of required components for an initial request .