You are here

function view_revisions_install in Config Entity Revisions 8.2

Implements hook_install().

File

modules/view_revisions/view_revisions.install, line 11
view_revisions install hooks.

Code

function view_revisions_install() {
  $entityTypeManager = \Drupal::entityTypeManager();
  $cert_storage = $entityTypeManager
    ->getStorage('config_entity_revisions_type');
  $entity = $cert_storage
    ->create([
    'id' => 'view_revisions',
    'label' => 'View Revisions',
  ]);
  $entity
    ->save();
}