function system_post_update_add_description_to_entity_form_mode
Update description for form modes.
File
-
core/
modules/ system/ system.post_update.php, line 146
Code
function system_post_update_add_description_to_entity_form_mode(?array &$sandbox = NULL) : void {
$config_entity_updater = \Drupal::classResolver(ConfigEntityUpdater::class);
$callback = function (EntityFormModeInterface $entity_form_mode) {
return $entity_form_mode->get('description') === NULL;
};
$config_entity_updater->update($sandbox, 'entity_form_mode', $callback);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.