StarterKit.php

Same filename and directory in other branches
  1. 10 core/themes/starterkit_theme/src/StarterKit.php
  2. 11.x core/themes/starterkit_theme/src/StarterKit.php
  3. 9 core/themes/starterkit_theme/src/StarterKit.php

Namespace

Drupal\starterkit_theme

File

core/themes/starterkit_theme/src/StarterKit.php

View source
<?php

namespace Drupal\starterkit_theme;

use Drupal\Core\Theme\StarterKitInterface;

/**
 * Interacts with theme generation.
 */
final class StarterKit implements StarterKitInterface {
  
  /**
   * {@inheritdoc}
   */
  public static function postProcess(string $working_dir, string $machine_name, string $theme_name) : void {
    $readme_file = "{$working_dir}/README.md";
    try {
      file_put_contents($readme_file, "{$theme_name} theme, generated from starterkit_theme. Additional information on generating themes can be found in the [Starterkit documentation](https://www.drupal.org/docs/core-modules-and-themes/core-themes/starterkit-theme).");
    } catch (\Throwable) {
    }
  }

}

Classes

Title Deprecated Summary
StarterKit Interacts with theme generation.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.