Skip to content
Snippets Groups Projects
Commit 78304967 authored by Andrey Vitushkin's avatar Andrey Vitushkin
Browse files

Issue #3450445: Remove from the IpAddressPostgreSqlWidget class the "database"...

Issue #3450445: Remove from the IpAddressPostgreSqlWidget class the "database" service because it's not used
parent 4461d251
No related branches found
No related tags found
No related merge requests found
...@@ -4,13 +4,9 @@ declare(strict_types=1); ...@@ -4,13 +4,9 @@ declare(strict_types=1);
namespace Drupal\field_ipaddress_pgsql\Plugin\Field\FieldWidget; namespace Drupal\field_ipaddress_pgsql\Plugin\Field\FieldWidget;
use Drupal\Core\Database\Connection;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\WidgetBase; use Drupal\Core\Field\WidgetBase;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Plugin implementation of the 'IP Address PostgreSQL' widget. * Plugin implementation of the 'IP Address PostgreSQL' widget.
...@@ -23,35 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; ...@@ -23,35 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* } * }
* ) * )
*/ */
final class IpAddressPostgreSqlWidget extends WidgetBase implements ContainerFactoryPluginInterface { final class IpAddressPostgreSqlWidget extends WidgetBase {
/**
* Constructs the plugin instance.
*/
public function __construct(
$plugin_id,
$plugin_definition,
FieldDefinitionInterface $field_definition,
array $settings,
array $third_party_settings,
private readonly Connection $connection,
) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): self {
return new self(
$plugin_id,
$plugin_definition,
$configuration['field_definition'],
$configuration['settings'],
$configuration['third_party_settings'],
$container->get('database')
);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment