function sms_update_8101 in SMS Framework 8
Same name and namespace in other branches
- 2.x sms.install \sms_update_8101()
- 2.1.x sms.install \sms_update_8101()
Install the "sms_result" and "sms_report" entity types.
File
- ./
sms.install, line 64 - Install, update and uninstall functions for SMS Framework.
Code
function sms_update_8101() {
$update_manager = \Drupal::entityDefinitionUpdateManager();
$entity_type_manager = \Drupal::entityTypeManager();
if ($update_manager
->getEntityType('sms')) {
// Add storage definitions for the sms_result and sms_report entities.
if (!$update_manager
->getEntityType('sms_result')) {
$update_manager
->installEntityType($entity_type_manager
->getDefinition('sms_result'));
}
if (!$update_manager
->getEntityType('sms_report')) {
$update_manager
->installEntityType($entity_type_manager
->getDefinition('sms_report'));
}
}
}