Problem/Motivation

It would be great to be able to alter the link extractor query in getQuery. My own use case is that my links are in a referenced entity that is always published, and I'd like to only include links where the parent entity is published.

Proposed resolution

The simplest way of doing this is possibly just to add a tag.
$query->addTag('linkchecker_links_' . $entityType->getBundleEntityType() . '_' . $bundle);

Then someone using hook_query_alter() would be able to alter it.

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:

  • 2.1.x Comparechanges, plain diff MR !127
  • 1 hidden branch
  • 3552188-add-tag-to Comparecompare

Comments

patrickharris created an issue. See original summary.

rosk0’s picture

Status: Active » Reviewed & tested by the community

Looks sensible.

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your contribution. Committed. 🍻

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

vladimiraus changed the visibility of the branch 3552188-add-tag-to to hidden.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.