public function TokenCustomForm::__construct in Custom Tokens 8
Constructs a TokenCustomForm object.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityStorageInterface $token_custom_storage: The custom token storage.
\Drupal\Core\Entity\EntityStorageInterface $token_custom_type_storage: The custom token type storage.
Overrides ContentEntityForm::__construct
File
- src/
Form/ TokenCustomForm.php, line 50
Class
- TokenCustomForm
- Form handler for the custom token edit forms.
Namespace
Drupal\token_custom\FormCode
public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($entity_repository, $entity_type_bundle_info, $time);
$this->tokenCustomStorage = $entity_type_manager
->getStorage('token_custom');
$this->tokenCustomTypeStorage = $entity_type_manager
->getStorage('token_custom_type');
}