function ConfigInstallDependencyTestHooks::configTestCreate

Implements hook_ENTITY_TYPE_create().

File

core/modules/config/tests/config_install_dependency_test/src/Hook/ConfigInstallDependencyTestHooks.php, line 18

Class

ConfigInstallDependencyTestHooks
Hook implementations for config_install_dependency_test.

Namespace

Drupal\config_install_dependency_test\Hook

Code

public function configTestCreate(EntityInterface $entity) {
    // Add an enforced dependency on this module so that we can test if this is
    // possible during module installation.
    $entity->setEnforcedDependencies([
        'module' => [
            'config_install_dependency_test',
        ],
    ]);
}

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