public function TransactorBase::__construct in Transaction 8
Constructs a \Drupal\Component\Plugin\PluginBase object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
Overrides PluginBase::__construct
File
- src/
TransactorBase.php, line 67
Class
- TransactorBase
- Provides a base class for transactor plugins.
Namespace
Drupal\transactionCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, TranslationInterface $string_translation, EntityStorageInterface $transaction_storage, TransactionServiceInterface $transaction_service, EntityFieldManagerInterface $field_manager, AccountInterface $current_user, ConfigFactoryInterface $config_factory) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->stringTranslation = $string_translation;
$this->transactionStorage = $transaction_storage;
$this->transactionService = $transaction_service;
$this->configuration += $this
->defaultConfiguration();
$this->fieldManager = $field_manager;
$this->currentUser = $current_user;
$this->fieldPrefix = $config_factory
->get('field_ui.settings')
->get('field_prefix') ?: 'field_';
}