Returns an instance of the configured source plugin.
\Drupal\tmgmt\SourcePluginInterface
Overrides JobItemInterface::getSourcePlugin
public function getSourcePlugin() {
if ($this
->get('plugin')->value) {
try {
return \Drupal::service('plugin.manager.tmgmt.source')
->createInstance($this
->get('plugin')->value);
} catch (PluginException $e) {
// Ignore exceptions due to missing source plugins.
}
}
return FALSE;
}