public function Key::setPlugin in Key 8
Sets a plugin of the requested type and plugin ID.
Parameters
string $type: The plugin type.
string $id: The plugin ID.
Overrides KeyInterface::setPlugin
File
- src/
Entity/ Key.php, line 178
Class
- Key
- Defines the Key entity.
Namespace
Drupal\key\EntityCode
public function setPlugin($type, $id) {
$this->{$type} = $id;
$this
->getPluginCollection($type)
->addInstanceId($id);
}