You are here

function colorapi_entity_type_alter in Color API 8

Implements hook_entity_type_alter().

File

./colorapi.module, line 36
Holds hooks for the Color API module.

Code

function colorapi_entity_type_alter(array &$entity_types) {

  // If the Color entity is disabled, remove the Color entity type.
  $color_entity_enabled = \Drupal::config('colorapi.settings')
    ->get('enable_color_entity');
  if (!$color_entity_enabled) {
    unset($entity_types['colorapi_color']);
  }
}