You are here

function eck_update_8005 in Entity Construction Kit (ECK) 8

Add 'status' key for entity type config.

File

./eck.install, line 90

Code

function eck_update_8005() {
  $config_factory = \Drupal::configFactory();
  foreach ($config_factory
    ->listAll('eck.eck_entity_type.') as $name) {
    $config = $config_factory
      ->getEditable($name);

    // By default 'status' field will be disabled for existing entities types.
    $config
      ->set('status', FALSE);
    $config
      ->save();
  }
}