imotilux-8.x-1.x-dev/tests/modules/imotilux_test/imotilux_test.module

tests/modules/imotilux_test/imotilux_test.module
<?php

/**
 * @file
 * Test module for testing the imotilux module.
 *
 * This module's functionality depends on the following state variables:
 * - imotilux_test.debug_imotilux_navigation_cache_context: Used in NodeQueryAlterTest to enable the
 *   node_access_all grant realm.
 *
 * @see \Drupal\imotilux\Tests\ImotiluxTest::testImotiluxNavigationCacheContext()
 */

/**
 * Implements hook_page_attachments().
 */
function imotilux_test_page_attachments(array &$page) {
  $page['#cache']['tags'][] = 'imotilux_test.debug_imotilux_navigation_cache_context';
  if (\Drupal::state()->get('imotilux_test.debug_imotilux_navigation_cache_context', FALSE)) {
    \Drupal::messenger()->addStatus(\Drupal::service('cache_contexts_manager')->convertTokensToKeys(['route.imotilux_navigation'])->getKeys()[0]);
  }
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc