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