workspaces_test.module

Same filename in other branches
  1. 10 core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.module

File

core/modules/workspaces/tests/modules/workspaces_test/workspaces_test.module

View source
<?php


/**
 * @file
 * Provides supporting code for testing workspaces.
 */
declare (strict_types=1);

/**
 * Implements hook_entity_type_alter().
 */
function workspaces_test_entity_type_alter(array &$entity_types) {
    $state = \Drupal::state();
    // Allow all entity types to have their definition changed dynamically for
    // testing purposes.
    foreach ($entity_types as $entity_type_id => $entity_type) {
        $entity_types[$entity_type_id] = $state->get("{$entity_type_id}.entity_type", $entity_types[$entity_type_id]);
    }
}

Functions

Title Deprecated Summary
workspaces_test_entity_type_alter Implements hook_entity_type_alter().

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