TaxonomyTermHierarchyConstraint.php in Drupal 10
File
core/modules/taxonomy/src/Plugin/Validation/Constraint/TaxonomyTermHierarchyConstraint.php
View source
<?php
namespace Drupal\taxonomy\Plugin\Validation\Constraint;
use Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase;
class TaxonomyTermHierarchyConstraint extends CompositeConstraintBase {
public $message = 'You can only change the hierarchy for the <em>published</em> version of this term.';
public function coversFields() {
return [
'parent',
'weight',
];
}
}