Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hierarchy_manager-3343978
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
hierarchy_manager-3343978
Commits
0d226686
Commit
0d226686
authored
5 years ago
by
Mingsong Hu
Browse files
Options
Downloads
Patches
Plain Diff
Fix submit function bug that prevents a taxonomy from saving while taxononmy plugin is disabled
parent
cdbe269e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Form/HmOverviewTerms.php
+15
-0
15 additions, 0 deletions
src/Form/HmOverviewTerms.php
with
15 additions
and
0 deletions
src/Form/HmOverviewTerms.php
+
15
−
0
View file @
0d226686
...
@@ -87,7 +87,22 @@ class HmOverviewTerms extends OverviewTerms {
...
@@ -87,7 +87,22 @@ class HmOverviewTerms extends OverviewTerms {
* The current state of the form.
* The current state of the form.
*/
*/
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
)
{
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
)
{
// Override the form if the taxonomy hierarchy manager has been set up.
if
(
$config
=
\Drupal
::
config
(
'hierarchy_manager.hmconfig'
))
{
if
(
$allowed_setup_plugins
=
$config
->
get
(
'allowed_setup_plugins'
))
{
// If the taxonomy setup plugin is enabled,
// override the submitForm function.
if
(
!
empty
(
$allowed_setup_plugins
[
'hm_setup_taxonomy'
]))
{
// We don't need to do anything here,
// as the taxonomy plugin take it over.
return
;
}
}
}
// The taxonomy setup plugin is not enabled.
// Let the submitForm function from core handle this request.
return
parent
::
submitForm
(
$form
,
$form_state
);
}
}
}
}
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