You are here

function page_cache_form_test_module_implements_alter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/page_cache/tests/modules/page_cache_form_test.module \page_cache_form_test_module_implements_alter()
  2. 10 core/modules/page_cache/tests/modules/page_cache_form_test.module \page_cache_form_test_module_implements_alter()

Implements hook_module_implements_alter().

File

core/modules/page_cache/tests/modules/page_cache_form_test.module, line 35
Provides functionality for testing form caching.

Code

function page_cache_form_test_module_implements_alter(&$implementations, $hook) {
  if ($hook === 'form_alter' && \Drupal::state()
    ->get('page_cache_bypass_form_immutability', FALSE)) {

    // Disable system_form_alter
    unset($implementations['system']);
  }
}