function text_update_11001

Same name and namespace in other branches
  1. 11.x core/modules/text/text.install \text_update_11001()

Install text_with_summary module.

File

core/modules/text/text.install, line 11

Code

function text_update_11001() : void {
  if (\Drupal::moduleHandler()->moduleExists('text_with_summary')) {
    return;
  }
  $storages = \Drupal::entityTypeManager()->getStorage('field_storage_config')
    ->loadByProperties([
    'type' => 'text_with_summary',
  ]);
  if ($storages !== []) {
    \Drupal::service('module_installer')->install([
      'text_with_summary',
    ]);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.