You are here

public function TfaSendPluginManager::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 DefaultPluginManager::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/TfaSendPluginManager.php, line 41

Class

TfaSendPluginManager
The send 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;
}