public function AddressDefaultWidget::__construct in Address 8
Constructs a AddressDefaultWidget object.
Parameters
string $plugin_id: The plugin_id for the widget.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.
array $settings: The widget settings.
array $third_party_settings: Any third party settings.
\CommerceGuys\Addressing\Country\CountryRepositoryInterface $country_repository: The country repository.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
Overrides WidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ AddressDefaultWidget.php, line 72
Class
- AddressDefaultWidget
- Plugin implementation of the 'address_default' widget.
Namespace
Drupal\address\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, CountryRepositoryInterface $country_repository, EventDispatcherInterface $event_dispatcher, ConfigFactoryInterface $config_factory) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->countryRepository = $country_repository;
$this->eventDispatcher = $event_dispatcher;
$this->configFactory = $config_factory;
}