Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
simple_sitemap
Commits
a17500c5
Commit
a17500c5
authored
Jul 11, 2016
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2764247
: Sitemap form elements show on other forms
parent
b52b90a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
src/Form.php
src/Form.php
+2
-2
src/Simplesitemap.php
src/Simplesitemap.php
+0
-2
No files found.
src/Form.php
View file @
a17500c5
...
...
@@ -24,7 +24,7 @@ class Form {
private
$formState
;
private
$generator
;
private
static
$
skip
FormOperations
=
[
'de
lete'
,
'cancel
'
];
private
static
$
allowed
FormOperations
=
[
'de
fault'
,
'edit'
,
'add'
,
'register
'
];
private
static
$valuesToCheck
=
[
'simple_sitemap_index_content'
,
'simple_sitemap_priority'
,
'simple_sitemap_regenerate_now'
];
/**
...
...
@@ -194,7 +194,7 @@ class Form {
$form_object
=
$this
->
formState
->
getFormObject
();
if
(
!
is_null
(
$form_object
)
&&
method_exists
(
$form_object
,
'getEntity'
)
&&
!
in_array
(
$form_object
->
getOperation
(),
self
::
$
skip
FormOperations
))
{
&&
in_array
(
$form_object
->
getOperation
(),
self
::
$
allowed
FormOperations
))
{
return
$form_object
->
getEntity
();
}
return
FALSE
;
...
...
src/Simplesitemap.php
View file @
a17500c5
...
...
@@ -374,7 +374,6 @@ class Simplesitemap {
foreach
(
$entity_types
as
$entity_type_id
=>
$entity_type
)
{
if
(
!
$entity_type
instanceof
ContentEntityTypeInterface
||
!
method_exists
(
$entity_type
,
'getBundleEntityType'
))
{
unset
(
$entity_types
[
$entity_type_id
]);
continue
;
}
}
return
$entity_types
;
...
...
@@ -389,7 +388,6 @@ class Simplesitemap {
if
(
empty
(
$entity_type
->
getBundleEntityType
()))
{
return
TRUE
;
}
return
FALSE
;
}
return
FALSE
;
//todo: throw exception
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment