Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Private Member Functions | Private Attributes | List of all members
eZ\Publish\Core\FieldType\RichText\InternalLinkValidator Class Reference

Validator for RichText internal format links. More...

## Public Member Functions
| __construct (ContentHandler $contentHandler, LocationHandler $locationHandler)
| InternalLinkValidator constructor. More...
| validate ($scheme, $id)
| Validates following link formats: 'ezcontent://<contentId>', 'ezremote://<contentRemoteId>', 'ezlocation://<locationId>'. More...

## Private Member Functions
| getInvalidLinkError ($scheme, $url)
| Builds error message for invalid url. More...
| getXPathForLinkTag ($tagName)
| Generates XPath expression for given link tag. More...

## Private Attributes
| $contentHandler
| $locationHandler

## Detailed Description

Validator for RichText internal format links.

Deprecated:
  since 7.4, use \EzSystems\EzPlatformRichText\eZ\RichText\Validator\InternalLinkValidator from EzPlatformRichTextBundle.

Definition at line 20 of file InternalLinkValidator.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\FieldType\RichText\InternalLinkValidator::__construct | ( | ContentHandler | $contentHandler,
|  | LocationHandler | $locationHandler
| ) |  |

InternalLinkValidator constructor.

Parameters

  \eZ\Publish\SPI\Persistence\Content\Handler | $contentHandler |
  \eZ\Publish\SPI\Persistence\Content\Location\Handler | $locationHandler |

Definition at line 34 of file InternalLinkValidator.php.

References eZ\Publish\Core\FieldType\RichText\InternalLinkValidator\$contentHandler, and eZ\Publish\Core\FieldType\RichText\InternalLinkValidator\$locationHandler.

## Member Function Documentation

## ◆ getInvalidLinkError()

eZ\Publish\Core\FieldType\RichText\InternalLinkValidator::getInvalidLinkError | ( |  | $scheme,
|  |  | $url
| ) |  |
| private

Builds error message for invalid url.

Exceptions

Definition at line 118 of file InternalLinkValidator.php.

## ◆ getXPathForLinkTag()

eZ\Publish\Core\FieldType\RichText\InternalLinkValidator::getXPathForLinkTag | ( |  | $tagName | ) |
| private

Generates XPath expression for given link tag.

Parameters

  string | $tagName |

Returns
  string

Definition at line 138 of file InternalLinkValidator.php.

## ◆ validate()

eZ\Publish\Core\FieldType\RichText\InternalLinkValidator::validate | ( |  | $scheme,
|  |  | $id
| ) |  |

Validates following link formats: 'ezcontent://<contentId>', 'ezremote://<contentRemoteId>', 'ezlocation://<locationId>'.

Exceptions

Definition at line 85 of file InternalLinkValidator.php.

## Member Data Documentation

## ◆ $contentHandler

eZ\Publish\Core\FieldType\RichText\InternalLinkValidator::$contentHandler
| private

Definition at line 23 of file InternalLinkValidator.php.

Referenced by eZ\Publish\Core\FieldType\RichText\InternalLinkValidator\__construct().

## ◆ $locationHandler

eZ\Publish\Core\FieldType\RichText\InternalLinkValidator::$locationHandler
| private

Definition at line 26 of file InternalLinkValidator.php.

Referenced by eZ\Publish\Core\FieldType\RichText\InternalLinkValidator\__construct().

The documentation for this class was generated from the following file:

- InternalLinkValidator.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.