From dbcea1148bc8e771b4fd0505c9677581984b46a9 Mon Sep 17 00:00:00 2001 From: antoniogr <antoniogr@348120.no-reply.drupal.org> Date: Fri, 29 Jan 2021 17:27:42 +0100 Subject: [PATCH] Issue #3168911 by antoniogr, imclean, runzipel: Too few arguments to __construct() when editing 'PDF Key' mapping field --- src/Form/FillPdfFormFieldForm.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Form/FillPdfFormFieldForm.php b/src/Form/FillPdfFormFieldForm.php index bd8b0bb..674931b 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') ); } -- GitLab