public function setConfig($key,
$value) { if ($definition =
$this->
getConfigDefinition($key)) { $typed_data = \Drupal::
typedDataManager()->
create($definition,
$value);
if ($typed_data->
validate()->
count() > 0
) { throw new PluginException("The provided configuration value does not pass validation."
);
} } $this->configuration
[$key] =
$value;
return $this;
}}