function text_update_11001

Installs the text_with_summary module when text_with_summary fields exist.

File

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

Code

function text_update_11001() : void {
  if (\Drupal::moduleHandler()->moduleExists('text_with_summary')) {
    return;
  }
  $storage_ids = \Drupal::entityQuery('field_storage_config')->accessCheck(FALSE)
    ->condition('type', 'text_with_summary')
    ->execute();
  if ($storage_ids !== []) {
    \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.