class LinkExternalProtocolsConstraint in Drupal 10
Same name and namespace in other branches
- 8 core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php \Drupal\link\Plugin\Validation\Constraint\LinkExternalProtocolsConstraint
- 9 core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php \Drupal\link\Plugin\Validation\Constraint\LinkExternalProtocolsConstraint
Defines a protocol validation constraint for links to external URLs.
Plugin annotation
@Constraint(
id = "LinkExternalProtocols",
label = @Translation("No dangerous external protocols", context = "Validation"),
)
Hierarchy
- class \Drupal\link\Plugin\Validation\Constraint\LinkExternalProtocolsConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of LinkExternalProtocolsConstraint
1 file declares its use of LinkExternalProtocolsConstraint
- LinkExternalProtocolsConstraintValidatorTest.php in core/
modules/ link/ tests/ src/ Unit/ Plugin/ Validation/ Constraint/ LinkExternalProtocolsConstraintValidatorTest.php
File
- core/
modules/ link/ src/ Plugin/ Validation/ Constraint/ LinkExternalProtocolsConstraint.php, line 15
Namespace
Drupal\link\Plugin\Validation\ConstraintView source
class LinkExternalProtocolsConstraint extends Constraint {
public $message = "The path '@uri' is invalid.";
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkExternalProtocolsConstraint:: |
public | property |