function profile_update_8007 in Profile 8
Set the 'published' entity key.
File
- ./
profile.install, line 145 - Install, update and uninstall functions for the profile module.
Code
function profile_update_8007() {
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
$entity_type = $definition_update_manager
->getEntityType('profile');
$keys = $entity_type
->getKeys();
$keys['published'] = 'status';
$entity_type
->set('entity_keys', $keys);
$definition_update_manager
->updateEntityType($entity_type);
}