Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quicklink
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
project
quicklink
Commits
ead3dd45
Commit
ead3dd45
authored
3 weeks ago
by
Mohammad Anwar Siddiqui
Browse files
Options
Downloads
Plain Diff
Merge branch '3472776-getting-error-when' into '2.0.x'
Issue-3472776: Fixed configuration page issue. See merge request
!14
parents
6c9ae268
aa807aaf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#459920
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Form/QuicklinkConfigForm.php
+12
-3
12 additions, 3 deletions
src/Form/QuicklinkConfigForm.php
with
12 additions
and
3 deletions
src/Form/QuicklinkConfigForm.php
+
12
−
3
View file @
ead3dd45
...
@@ -5,6 +5,7 @@ namespace Drupal\quicklink\Form;
...
@@ -5,6 +5,7 @@ namespace Drupal\quicklink\Form;
use
Drupal\Core\Form\ConfigFormBase
;
use
Drupal\Core\Form\ConfigFormBase
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Config\ConfigFactoryInterface
;
use
Drupal\Core\Config\ConfigFactoryInterface
;
use
Drupal\Core\Config\TypedConfigManagerInterface
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Drupal\Core\Entity\EntityTypeManagerInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
...
@@ -27,9 +28,16 @@ class QuicklinkConfigForm extends ConfigFormBase {
...
@@ -27,9 +28,16 @@ class QuicklinkConfigForm extends ConfigFormBase {
* The factory for configuration objects.
* The factory for configuration objects.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* The entity type manager.
* @param \Drupal\Core\Config\TypedConfigManagerInterface|null $typed_config_manager
* The typed config manager.
*/
*/
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
EntityTypeManagerInterface
$entity_type_manager
)
{
public
function
__construct
(
ConfigFactoryInterface
$config_factory
,
EntityTypeManagerInterface
$entity_type_manager
,
?TypedConfigManagerInterface
$typed_config_manager
=
null
)
{
parent
::
__construct
(
$config_factory
);
if
(
version_compare
(
\Drupal
::
VERSION
,
'10.2.0'
,
'>='
))
{
parent
::
__construct
(
$config_factory
,
$typed_config_manager
);
}
else
{
parent
::
__construct
(
$config_factory
);
}
$this
->
entityTypeManager
=
$entity_type_manager
;
$this
->
entityTypeManager
=
$entity_type_manager
;
}
}
...
@@ -39,7 +47,8 @@ class QuicklinkConfigForm extends ConfigFormBase {
...
@@ -39,7 +47,8 @@ class QuicklinkConfigForm extends ConfigFormBase {
public
static
function
create
(
ContainerInterface
$container
)
{
public
static
function
create
(
ContainerInterface
$container
)
{
return
new
static
(
return
new
static
(
$container
->
get
(
'config.factory'
),
$container
->
get
(
'config.factory'
),
$container
->
get
(
'entity_type.manager'
)
$container
->
get
(
'entity_type.manager'
),
$container
->
has
(
'config.typed'
)
?
$container
->
get
(
'config.typed'
)
:
NULL
);
);
}
}
...
...
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