diff --git a/src/Form/FillPdfFormFieldForm.php b/src/Form/FillPdfFormFieldForm.php index bd8b0bbb398647ac199f802a25c7ac8f8f96cc3d..674931b4d7917eece98e384d5eeca3fe3d089bd0 100644 --- a/src/Form/FillPdfFormFieldForm.php +++ b/src/Form/FillPdfFormFieldForm.php @@ -2,8 +2,10 @@ namespace Drupal\fillpdf\Form; +use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Entity\ContentEntityForm; use Drupal\Core\Entity\EntityRepositoryInterface; +use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\fillpdf\FillPdfAdminFormHelperInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,9 +29,13 @@ class FillPdfFormFieldForm extends ContentEntityForm { * The entity repository service. * @param \Drupal\fillpdf\FillPdfAdminFormHelperInterface $admin_form_helper * FillPdf admin form helper service. + * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info + * The entity type bundle service. + * @param \Drupal\Component\Datetime\TimeInterface $time + * The time service. */ - public function __construct(EntityRepositoryInterface $entity_repository, FillPdfAdminFormHelperInterface $admin_form_helper) { - parent::__construct($entity_repository); + public function __construct(EntityRepositoryInterface $entity_repository, FillPdfAdminFormHelperInterface $admin_form_helper, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time) { + parent::__construct($entity_repository, $entity_type_bundle_info, $time); $this->adminFormHelper = $admin_form_helper; } @@ -39,7 +45,9 @@ class FillPdfFormFieldForm extends ContentEntityForm { public static function create(ContainerInterface $container) { return new static( $container->get('entity.repository'), - $container->get('fillpdf.admin_form_helper') + $container->get('fillpdf.admin_form_helper'), + $container->get('entity_type.bundle.info'), + $container->get('datetime.time') ); }