TestInstallerThemeHooks.php
Same filename and directory in other branches
Namespace
Drupal\test_installer_theme\HookFile
-
core/
modules/ system/ tests/ themes/ test_installer_theme/ src/ Hook/ TestInstallerThemeHooks.php
View source
<?php
declare (strict_types=1);
namespace Drupal\test_installer_theme\Hook;
use Drupal\Core\Hook\Attribute\Hook;
/**
* Form alter hooks for installer tests.
*/
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,
];
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| TestInstallerThemeHooks | Form alter hooks for installer tests. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.