Attention

TYPO3 v10 has reached end-of-life as of April 30th 2023 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.

Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.

BrokenLinkAnalysisEvent

A PSR-14-based event TYPO3\CMS\Core\Html\Event\BrokenLinkAnalysisEvent can be used to get information about broken links set in the rich text editor (RTE).

The procedure for marking the broken links in the RTE is as follow:

  1. RTE content is fetched from the database. Before it is displayed in the edit form, RTE transformations are performed.

  2. The transformation function parses the text and detects links.

  3. For each link, a new PSR-14 event is dispatched.

  4. If a listener is attached, it may set the link as broken and will set the link as "checked".

  5. If a link is detected as broken, RTE will mark it as broken.

This functionality is implemented in the system extension "linkvalidator". Other extensions can use the event to override the default behaviour.

API

class TYPO3\CMS\Core\Html\Event\BrokenLinkAnalysisEvent

Event that is fired to validate if a link is valid or not.

isPropagationStopped()
Return type

bool

getLinkType()
Return type

string

getLinkData()
Return type

array

Parameters
  • $reason (string) -- the reason, default: ''

Return type

bool

getReason()
Return type

string