function InfoParserDynamic::__construct
InfoParserDynamic constructor.
Parameters
string|null $app_root: The root directory of the Drupal installation.
File
- 
              core/
lib/ Drupal/ Core/ Extension/ InfoParserDynamic.php, line 32  
Class
- InfoParserDynamic
 - Parses dynamic .info.yml files that might change during the page request.
 
Namespace
Drupal\Core\ExtensionCode
public function __construct(string $app_root = NULL) {
  if ($app_root === NULL) {
    // @todo https://www.drupal.org/project/drupal/issues/3087975 Require
    //   $app_root argument.
    $app_root = \Drupal::hasService('kernel') ? \Drupal::root() : DRUPAL_ROOT;
  }
  $this->root = $app_root;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.