ConfigOverrideMessageTestHooks.php

Namespace

Drupal\config_override_message_test\Hook

File

core/modules/config/tests/config_override_message_test/src/Hook/ConfigOverrideMessageTestHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\config_override_message_test\Hook;

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for config_override_message_test.
 */
class ConfigOverrideMessageTestHooks {
    
    /**
     * Implements hook_form_FORM_ID_alter().
     */
    public function formSystemSiteInformationSettingsAlter(array &$form, FormStateInterface $form_state, string $form_id) : void {
        // Set a weight to a negative amount to ensure the config overrides message
        // is above it.
        $form['site_information']['#weight'] = -5;
    }

}

Classes

Title Deprecated Summary
ConfigOverrideMessageTestHooks Hook implementations for config_override_message_test.

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