diff --git a/modules/recurring_events_registration/src/Form/RegistrantForm.php b/modules/recurring_events_registration/src/Form/RegistrantForm.php index bc6f2181a3dfb403a323571a4133baa7b0b027aa..6320b945cec3f7b6c471a7cbd62fff56fff514ea 100644 --- a/modules/recurring_events_registration/src/Form/RegistrantForm.php +++ b/modules/recurring_events_registration/src/Form/RegistrantForm.php @@ -15,6 +15,8 @@ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Cache\CacheTagsInvalidatorInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; +use Drupal\Component\Datetime\TimeInterface; +use Drupal\Core\Entity\EntityTypeBundleInfoInterface; /** * Form controller for Registrant edit forms. @@ -85,6 +87,8 @@ class RegistrantForm extends ContentEntityForm { public static function create(ContainerInterface $container) { return new static( $container->get('entity.repository'), + $container->get('entity_type.bundle.info'), + $container->get('datetime.time'), $container->get('messenger'), $container->get('recurring_events_registration.creation_service'), $container->get('current_user'), @@ -101,6 +105,10 @@ class RegistrantForm extends ContentEntityForm { * * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository * The entity repository service. + * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info + * The entity type bundle service. + * @param \Drupal\Component\Datetime\TimeInterface $time + * The time service. * @param \Drupal\Core\Messenger\Messenger $messenger * The messenger service. * @param \Drupal\recurring_events_registration\RegistrationCreationService $creation_service @@ -120,6 +128,8 @@ class RegistrantForm extends ContentEntityForm { */ public function __construct( EntityRepositoryInterface $entity_repository, + EntityTypeBundleInfoInterface $entity_type_bundle_info, + TimeInterface $time, Messenger $messenger, RegistrationCreationService $creation_service, AccountProxyInterface $current_user, @@ -136,7 +146,7 @@ class RegistrantForm extends ContentEntityForm { $this->routeMatch = $route_match; $this->entityTypeManager = $entity_type_manager; $this->cacheTagsInvalidator = $cache_tags_invalidator; - parent::__construct($entity_repository); + parent::__construct($entity_repository, $entity_type_bundle_info, $time); } /** diff --git a/src/Form/EventInstanceForm.php b/src/Form/EventInstanceForm.php index f084247ccc63d4173a91e878eb3aa13732960a48..9845dcebad73b2361a7427972be9bfbe7a49c02e 100644 --- a/src/Form/EventInstanceForm.php +++ b/src/Form/EventInstanceForm.php @@ -9,6 +9,7 @@ use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Messenger\Messenger; use Drupal\Core\Session\AccountProxyInterface; use Drupal\Component\Datetime\TimeInterface; +use Drupal\Core\Entity\EntityTypeBundleInfoInterface; /** * Form controller for the eventinstance entity edit forms. @@ -44,9 +45,10 @@ class EventInstanceForm extends ContentEntityForm { public static function create(ContainerInterface $container) { return new static( $container->get('entity.repository'), + $container->get('entity_type.bundle.info'), + $container->get('datetime.time'), $container->get('messenger'), - $container->get('current_user'), - $container->get('datetime.time') + $container->get('current_user') ); } @@ -55,18 +57,20 @@ class EventInstanceForm extends ContentEntityForm { * * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository * The entity repository service. + * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info + * The entity type bundle service. + * @param \Drupal\Component\Datetime\TimeInterface $time + * The time service. * @param \Drupal\Core\Messenger\Messenger $messenger * The messenger service. * @param \Drupal\Core\Session\AccountProxyInterface $current_user * The current user. - * @param \Drupal\Component\Datetime\TimeInterface $time - * The time service. */ - public function __construct(EntityRepositoryInterface $entity_repository, Messenger $messenger, AccountProxyInterface $current_user, TimeInterface $time) { + public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, Messenger $messenger, AccountProxyInterface $current_user) { $this->messenger = $messenger; $this->currentUser = $current_user; $this->time = $time; - parent::__construct($entity_repository); + parent::__construct($entity_repository, $entity_type_bundle_info, $time); } /**