Commit 2e51a398 authored by andrei.dincu's avatar andrei.dincu

Issue #2249723 by andrei.dincu: Change from QueryAlterableInterface to...

Issue #2249723 by andrei.dincu: Change from QueryAlterableInterface to AlterableInterface and from EntityFieldQuery to QueryInterface in xmlsitemap_query_xmlsitemap_link_bundle_access_alter()
parent fea50852
......@@ -5,6 +5,8 @@
* XML sitemap integration functions for xmlsitemap.module.
*/
use Drupal\xmlsitemap\XmlSitemapInterface;
use Drupal\Core\Database\Query\AlterableInterface;
use Drupal\Core\Entity\Query\QueryInterface;
/**
* Implements hook_xmlsitemap_link_info().
......@@ -96,8 +98,8 @@ function xmlsitemap_sitemap_multiple_update(array $smids) {
/**
* Implements hook_query_TAG_alter().
*/
function xmlsitemap_query_xmlsitemap_link_bundle_access_alter(QueryAlterableInterface $query) {
if ($query instanceof EntityFieldQuery && $entity = $query->getMetaData('entity')) {
function xmlsitemap_query_xmlsitemap_link_bundle_access_alter(AlterableInterface $query) {
if ($query instanceof QueryInterface && $entity = $query->getMetaData('entity')) {
$info = $query->getMetaData('entity_info');
$bundle = $query->getMetaData('bundle');
if (empty($bundle)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment