You are here

function ds_test_theme_suggestions_alter in Display Suite 8.3

Same name and namespace in other branches
  1. 8.4 tests/modules/ds_test/ds_test.module \ds_test_theme_suggestions_alter()
  2. 8.2 tests/modules/ds_test/ds_test.module \ds_test_theme_suggestions_alter()

Implements hook_theme_suggestions_alter().

File

tests/modules/ds_test/ds_test.module, line 16
Display Suite test module.

Code

function ds_test_theme_suggestions_alter(&$suggestions, $variables, $base_theme_hook) {
  if (isset($variables['content']) && is_array($variables['content']) && isset($variables['content']['#ds_configuration']) && $base_theme_hook != 'ds_entity_view') {
    if (isset($_GET['store_suggestions'])) {
      \Drupal::cache()
        ->set('ds_test_suggestions', $suggestions);
    }
  }
}