/** * Constructs a new ZoneMemberCountry object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The pluginId for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \CommerceGuys\Addressing\Repository\AddressFormatRepositoryInterface $address_format_repository * The address format repository. * @param \CommerceGuys\Addressing\Repository\CountryRepositoryInterface $country_repository * The country repository. * @param \CommerceGuys\Addressing\Repository\SubdivisionRepositoryInterface $subdivision_repository * The subdivision repository. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, AddressFormatRepositoryInterface $address_format_repository, CountryRepositoryInterface $country_repository, SubdivisionRepositoryInterface $subdivision_repository) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->addressFormatRepository = $address_format_repository; $this->countryRepository = $country_repository; $this->subdivisionRepository = $subdivision_repository; }
/** * Constructs a new ZoneMemberZone object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The pluginId for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity type manager. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->zoneStorage = $entity_type_manager->getStorage('zone'); }