diff --git a/src/Plugin/os2web/DataLookup/DataLookupBase.php b/src/Plugin/os2web/DataLookup/DataLookupBase.php index 2087814..4c8dc25 100644 --- a/src/Plugin/os2web/DataLookup/DataLookupBase.php +++ b/src/Plugin/os2web/DataLookup/DataLookupBase.php @@ -3,8 +3,10 @@ namespace Drupal\os2web_datalookup\Plugin\os2web\DataLookup; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Plugin\PluginBase; use Drupal\os2web_audit\Service\Logger; +use Symfony\Component\DependencyInjection\ContainerInterface; /** * Provides a base class for image effects. @@ -16,7 +18,7 @@ * @see \Drupal\image\ImageEffectManager * @see plugin_api */ -abstract class DataLookupBase extends PluginBase implements DataLookupInterface { +abstract class DataLookupBase extends PluginBase implements DataLookupInterface, ContainerFactoryPluginInterface { /** * Plugin readiness flag. @@ -46,6 +48,18 @@ public function __construct( $this->setConfiguration($configuration); } + /** + * {@inheritdoc} + */ + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { + return new static( + $configuration, + $plugin_id, + $plugin_definition, + $container->get('os2web_audit.logger'), + ); + } + /** * {@inheritdoc} */