class UniquePathAliasConstraint
Same name in other branches
- 9 core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/UniquePathAliasConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\UniquePathAliasConstraint
- 10 core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/UniquePathAliasConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\UniquePathAliasConstraint
- 11.x core/lib/Drupal/Core/Path/Plugin/Validation/Constraint/UniquePathAliasConstraint.php \Drupal\Core\Path\Plugin\Validation\Constraint\UniquePathAliasConstraint
Validation constraint for unique path alias values.
Plugin annotation
@Constraint(
id = "UniquePathAlias",
label = @Translation("Unique path alias.", context = "Validation"),
)
Hierarchy
- class \Drupal\Core\Path\Plugin\Validation\Constraint\UniquePathAliasConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of UniquePathAliasConstraint
File
-
core/
lib/ Drupal/ Core/ Path/ Plugin/ Validation/ Constraint/ UniquePathAliasConstraint.php, line 15
Namespace
Drupal\Core\Path\Plugin\Validation\ConstraintView source
class UniquePathAliasConstraint extends Constraint {
/**
* The default violation message.
*
* @var string
*/
public $message = 'The alias %alias is already in use in this language.';
/**
* Violation message when the path alias exists with different capitalization.
*
* @var string
*/
public $differentCapitalizationMessage = 'The alias %alias could not be added because it is already in use in this language with different capitalization: %stored_alias.';
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UniquePathAliasConstraint::$differentCapitalizationMessage | public | property | Violation message when the path alias exists with different capitalization. |
UniquePathAliasConstraint::$message | public | property | The default violation message. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.