function views_revisions_install in Config Entity Revisions 8
Same name and namespace in other branches
- 1.x modules/views_revisions/views_revisions.install \views_revisions_install()
Implements hook_install().
File
- modules/
views_revisions/ views_revisions.install, line 8
Code
function views_revisions_install() {
$entityTypeManager = \Drupal::entityTypeManager();
$cert_storage = $entityTypeManager
->getStorage('config_entity_revisions_type');
$entity = $cert_storage
->create([
'id' => 'views_revisions',
'label' => 'Views Revisions',
]);
$entity
->save();
}