getMessageFromFile example

$file = $this->eventName . '-message.txt';
    if ($config_file = $package_config['drupal-core-project-message'][$this->eventName . '-file'] ?? FALSE) {
      $file = $config_file;
    }

    $message = $package_config['drupal-core-project-message'][$this->eventName . '-message'] ?? [];

    if ($message) {
      $this->messageText = $message;
    }
    else {
      $this->messageText = $this->getMessageFromFile($file);
    }

    // Include structured support info from composer.json.     if ($config_keys = $package_config['drupal-core-project-message']['include-keys'] ?? FALSE) {
      foreach ($config_keys as $config_key) {
        switch ($config_key) {
          case 'name':
            if ($homepage = $this->rootPackage->getName()) {
              $this->messageText[] = ' * Name: ' . $homepage;
            }
            break;

          
Home | Imprint | This part of the site doesn't use cookies.