Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
xmlsitemap
Commits
d76d9e50
Commit
d76d9e50
authored
May 02, 2016
by
amateescu
Browse files
Fix uninstall hook.
parent
1b484dce
Changes
1
Hide whitespace changes
Inline
Side-by-side
xmlsitemap.install
View file @
d76d9e50
...
...
@@ -328,13 +328,15 @@ function xmlsitemap_uninstall() {
// Remove the file cache directory.
xmlsitemap_clear_directory
(
NULL
,
TRUE
);
$entit
i
es
=
\
Drupal
::
entityTypeManager
()
->
getDefinitions
();
$entit
y_typ
es
=
\
Drupal
::
entityTypeManager
()
->
getDefinitions
();
$bundles
=
\
Drupal
::
service
(
'entity_type.bundle.info'
)
->
getAllBundleInfo
();
$state_variables
=
array
();
foreach
(
$entities
as
$entity_id
=>
$entity
)
{
foreach
(
$bundles
[
$entity_id
]
as
$bundle_id
=>
$bundle
)
{
xmlsitemap_link_bundle_delete
(
$entity_id
,
$bundle_id
);
foreach
(
$entity_types
as
$entity_type_id
=>
$entity_type
)
{
if
(
isset
(
$bundles
[
$entity_type_id
]))
{
foreach
(
$bundles
[
$entity_type_id
]
as
$bundle_id
=>
$bundle
)
{
xmlsitemap_link_bundle_delete
(
$entity_type_id
,
$bundle_id
);
}
}
}
}
...
...
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