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