Problem/Motivation

XmlSitemapLinkStorageInterface is outdated and no longer matches the methods of XmlSitemapLinkStorage:

  • save() takes a second parameter array $context = [] in the implementation, which it passes to hook_xmlsitemap_link_alter(), hook_xmlsitemap_link_insert() and hook_xmlsitemap_link_update(). The interface declares only save(array $link).
  • create() and save() return the sitemap link array, but the interface documents no @return.

Proposed resolution

Update the interface to match the implementation: add array $context = [] to save(), and document the return values of create() and save().

API changes

XmlSitemapLinkStorageInterface::save() gains an optional $context parameter. Other implementations of the interface must accept it.

Issue fork xmlsitemap-3634385

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

Priority: Normal » Minor
Status: Active » Needs review