class TestInstallerThemeHooks

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/themes/test_installer_theme/src/Hook/TestInstallerThemeHooks.php \Drupal\test_installer_theme\Hook\TestInstallerThemeHooks

Form alter hooks for installer tests.

Hierarchy

Expanded class hierarchy of TestInstallerThemeHooks

File

core/modules/system/tests/themes/test_installer_theme/src/Hook/TestInstallerThemeHooks.php, line 12

Namespace

Drupal\test_installer_theme\Hook
View source
class TestInstallerThemeHooks {
  
  /**
   * Implements hook_form_FORM_ID_alter().
   */
  public function formInstallSelectLanguageFormAlter(array &$form) : void {
    $form['function_name']['#markup'] = 'Added by custom installer theme.';
  }
  
  /**
   * Implements hook_form_FORM_ID_alter().
   *
   * The site configuration form is the last installer step. The profile has
   * installed its own themes by then, so this marker shows that the install
   * theme still has its hook implementations registered.
   */
  public function formInstallConfigureFormAlter(array &$form) : void {
    $form['installer_theme_marker'] = [
      '#markup' => 'Added by custom installer theme on the last step.',
      '#weight' => -100,
    ];
  }

}

Members

Title Sort descending Modifiers Object type Summary
TestInstallerThemeHooks::formInstallConfigureFormAlter public function Implements hook_form_FORM_ID_alter().
TestInstallerThemeHooks::formInstallSelectLanguageFormAlter public function Implements hook_form_FORM_ID_alter().

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