You are here

public function LinkAttributesManager::processDefinition in Link Attributes widget 8

Performs extra processing on plugin definitions.

By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.

Overrides DefaultPluginManager::processDefinition

File

src/LinkAttributesManager.php, line 57

Class

LinkAttributesManager
Provides the link_attributes plugin manager.

Namespace

Drupal\link_attributes

Code

public function processDefinition(&$definition, $plugin_id) {
  parent::processDefinition($definition, $plugin_id);

  // Make sure each plugin definition had at least a field type.
  if (empty($definition['type'])) {
    $definition['type'] = 'textfield';
  }
}