public function DateRecurModularSierraWidget::__construct in Recurring Date Field Modular Widgets 8
Same name and namespace in other branches
- 3.x src/Plugin/Field/FieldWidget/DateRecurModularSierraWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularSierraWidget::__construct()
- 2.x src/Plugin/Field/FieldWidget/DateRecurModularSierraWidget.php \Drupal\date_recur_modular\Plugin\Field\FieldWidget\DateRecurModularSierraWidget::__construct()
Constructs a new DateRecurModularSierraWidget.
Parameters
string $plugin_id: The plugin_id for the formatter.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the formatter is associated.
array $settings: The formatter settings.
array $third_party_settings: Third party settings.
\Drupal\Core\Config\ConfigFactoryInterface $configFactory: A config factory for retrieving required config objects.
\Drupal\Core\TempStore\PrivateTempStoreFactory $tempStoreFactory: The PrivateTempStore factory.
\Drupal\Core\Form\FormBuilderInterface $formBuilder: Provides form building and processing.
\Drupal\Core\Session\AccountInterface $currentUser: The current user.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.
\Drupal\Core\Language\LanguageManagerInterface $languageManager: The language manager.
\Drupal\Core\Datetime\DateFormatterInterface $dateFormatter: The date formatter service.
Overrides DateRecurModularWidgetBase::__construct
File
- src/
Plugin/ Field/ FieldWidget/ DateRecurModularSierraWidget.php, line 314
Class
- DateRecurModularSierraWidget
- Date recur sierra widget.
Namespace
Drupal\date_recur_modular\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ConfigFactoryInterface $configFactory, PrivateTempStoreFactory $tempStoreFactory, FormBuilderInterface $formBuilder, AccountInterface $currentUser, EntityTypeManagerInterface $entityTypeManager, LanguageManagerInterface $languageManager, DateFormatterInterface $dateFormatter) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $configFactory);
$this->tempStoreFactory = $tempStoreFactory;
$this->formBuilder = $formBuilder;
$this->currentUser = $currentUser;
$this->dateRecurInterpreterStorage = $entityTypeManager
->getStorage('date_recur_interpreter');
$this->dateFormatStorage = $entityTypeManager
->getStorage('date_format');
$this->languageManager = $languageManager;
$this->dateFormatter = $dateFormatter;
}