class UniquePathAliasConstraint in Drupal 8
Same name and namespace in other branches
- 9 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UniquePathAliasConstraint:: |
public | property | Violation message when the path alias exists with different capitalization. | |
UniquePathAliasConstraint:: |
public | property | The default violation message. |