function FieldUninstallValidator::getFieldStoragesByModule

Same name in other branches
  1. 8.9.x core/modules/field/src/FieldUninstallValidator.php \Drupal\field\FieldUninstallValidator::getFieldStoragesByModule()
  2. 10 core/modules/field/src/FieldUninstallValidator.php \Drupal\field\FieldUninstallValidator::getFieldStoragesByModule()
  3. 11.x core/modules/field/src/FieldUninstallValidator.php \Drupal\field\FieldUninstallValidator::getFieldStoragesByModule()

Returns all field storages for a specified module.

Parameters

string $module: The module to filter field storages by.

Return value

\Drupal\field\FieldStorageConfigInterface[] An array of field storages for a specified module.

1 call to FieldUninstallValidator::getFieldStoragesByModule()
FieldUninstallValidator::validate in core/modules/field/src/FieldUninstallValidator.php
Determines the reasons a module can not be uninstalled.

File

core/modules/field/src/FieldUninstallValidator.php, line 94

Class

FieldUninstallValidator
Prevents uninstallation of modules providing active field storage.

Namespace

Drupal\field

Code

protected function getFieldStoragesByModule($module) {
    return $this->fieldStorageConfigStorage
        ->loadByProperties([
        'module' => $module,
        'include_deleted' => TRUE,
    ]);
}

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