SilverStripe\ExternalLinks\Tasks\CheckExternalLinksTask
Synopsis
class CheckExternalLinksTask
extends BuildTask
{
- // members
- private static array $dependencies = ;
- private static string $segment = 'CheckExternalLinksTask';
- private static array $ignore_codes = ;
- protected bool $silent = false;
- protected LinkChecker $linkChecker;
- protected string $title = 'Checking broken External links in the SiteTree';
- protected string $description = 'A task that records external broken links in the SiteTree';
- protected boolean $enabled = true;
- // methods
- protected void log()
- public void run()
- public void setSilent()
- public void setLinkChecker()
- public LinkChecker getLinkChecker()
- protected void checkPageLink()
- protected bool isCodeBroken()
- public BrokenExternalPageTrackStatus runLinksCheck()
- private void updateCompletedPages()
- private void updateJobInfo()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Members
private
- $dependencies
- $ignore_codes
—
array
Define a list of HTTP response codes that should not be treated as "broken", where they usually might be. - $segment
protected
- $description
- $enabled
- $linkChecker — SilverStripe\ExternalLinks\Tasks\LinkChecker
- $silent — SilverStripe\ExternalLinks\Tasks\bool
- $title
Methods
private
protected
- checkPageLink() — Check the status of a single link on a page
- isCodeBroken() — Determine if the given HTTP code is "broken"
- log() — Log a message
public
- getLinkChecker()
- run()
- runLinksCheck() — Runs the links checker and returns the track used
- setLinkChecker()
- setSilent() — Turn on or off message output