Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
recurring_events-3312242
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
recurring_events-3312242
Commits
c7e06804
Commit
c7e06804
authored
4 years ago
by
Owen Bush
Committed by
Owen Bush
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3164160
by owenbush, MrPaulDriver: ArgumentCountError : Drupal 9 only
parent
c9d0cd29
No related branches found
Branches containing commit
Tags
8.x-1.0-beta2
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/recurring_events_registration/src/Form/RegistrantForm.php
+11
-1
11 additions, 1 deletion
...recurring_events_registration/src/Form/RegistrantForm.php
src/Form/EventInstanceForm.php
+10
-6
10 additions, 6 deletions
src/Form/EventInstanceForm.php
with
21 additions
and
7 deletions
modules/recurring_events_registration/src/Form/RegistrantForm.php
+
11
−
1
View file @
c7e06804
...
...
@@ -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
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/Form/EventInstanceForm.php
+
10
−
6
View file @
c7e06804
...
...
@@ -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
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment