PathAliasConstraint.php
Same filename and directory in other branches
- 11.x core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
- 10 core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
- 9 core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
- 8.9.x core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraint.php
Namespace
Drupal\path\Plugin\Validation\ConstraintFile
-
core/
modules/ path/ src/ Plugin/ Validation/ Constraint/ PathAliasConstraint.php
View source
<?php
namespace Drupal\path\Plugin\Validation\Constraint;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;
/**
* Validation constraint for changing path aliases in pending revisions.
*/
class PathAliasConstraint extends SymfonyConstraint {
public function __construct(mixed $options = NULL, public $message = 'You can only change the URL alias for the <em>published</em> version of this content.', ?array $groups = NULL, mixed $payload = NULL) {
parent::__construct($options, $groups, $payload);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| PathAliasConstraint | Validation constraint for changing path aliases in pending revisions. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.