Task/Generate/FileAssembler.php
public function generateFiles($component_data, ComponentCollection $component_collection) {
    $component_list = $component_collection->getComponents();

    // Let each file component in the tree gather data from its own children.
    $this->collectFileContents($component_collection);

    // Build files.
    // Get info on files. All components that wish to provide a file should have
    // registered themselves as first-level children of the root component.
    $files = $this->collectFiles($component_collection);

    // Filter files according to the requested build list.
    if (isset($component_data['requested_build'])) {
      $component_collection->getRootComponent()->applyBuildListFilter($files, $component_data['requested_build'], $component_data);
    }

    // Then we assemble the files into a simple array of full filename and
    // contents.
    $files_assembled = $this->assembleFiles($component_collection, $files);

    return $files_assembled;
  }
public function generateFiles($component_data, ComponentCollection $component_collection) {
    $component_list = $component_collection->getComponents();

    // Let each file component in the tree gather data from its own children.
    $this->collectFileContents($component_collection);

    // Build files.
    // Get info on files. All components that wish to provide a file should have
    // registered themselves as first-level children of the root component.
    $files = $this->collectFiles($component_collection);

    // Filter files according to the requested build list.
    if (isset($component_data['requested_build'])) {
      $component_collection->getRootComponent()->applyBuildListFilter($files, $component_data['requested_build'], $component_data);
    }

    // Then we assemble the files into a simple array of full filename and
    // contents.
    $files_assembled = $this->assembleFiles($component_collection, $files);

    return $files_assembled;
  }
public function generateFiles ( $ component_data , ComponentCollection $ component_collection ) { $ component_list = $ component_collection -> getComponents ( ) ; // Let each file component in the tree gather data from its own children. $ this -> collectFileContents ( $ component_collection ) ; // Build files. // Get info on files. All components that wish to provide a file should have // registered themselves as first-level children of the root component. $ files = $ this -> collectFiles ( $ component_collection ) ; // Filter files according to the requested build list. if ( isset ( $ component_data [ 'requested_build' ] ) ) { $ component_collection -> getRootComponent ( ) -> applyBuildListFilter ( $ files , $ component_data [ 'requested_build' ] , $ component_data ) ; } // Then we assemble the files into a simple array of full filename and // contents. $ files_assembled = $ this -> assembleFiles ( $ component_collection , $ files ) ; return $ files_assembled ; }
Generate code files.

@param $component_data
The component data from the initial request.
@param \DrupalCodeBuilder\Generator\Collection\ComponentCollection $component_collection
The component collection.

@return
An array of files ready for output. Keys are the filepath and filename
relative to the module folder (eg, 'foo.module', 'tests/module.test');
values are strings of the contents for each file.
Generate code files .