You are here

public function TfaValidationPluginManager::getDefinitions in Two-factor Authentication (TFA) 8

Provide some backwards compatibility with the old implicit setupPluginId. This will give other modules more time to update their plugins.

Overrides DiscoveryTrait::getDefinitions

Deprecated

in tfa:8.x-1.0-alpha7 and is removed from tfa:8.x-2.0. Please specify the setupPluginId property in the plugin annotation.

See also

https://www.drupal.org/project/tfa/issues/2925066

File

src/TfaValidationPluginManager.php, line 109

Class

TfaValidationPluginManager
The validation plugin manager.

Namespace

Drupal\tfa

Code

public function getDefinitions() {
  $definitions = parent::getDefinitions();
  foreach ($definitions as &$definition) {
    if (empty($definition['setupPluginId'])) {
      $definition['setupPluginId'] = $definition['id'] . '_setup';
    }
  }
  return $definitions;
}