class ModerationState in Workbench Moderation 8
Same name in this branch
- 8 src/Entity/ModerationState.php \Drupal\workbench_moderation\Entity\ModerationState
- 8 src/Plugin/Validation/Constraint/ModerationState.php \Drupal\workbench_moderation\Plugin\Validation\Constraint\ModerationState
Same name and namespace in other branches
- 8.2 src/Plugin/Validation/Constraint/ModerationState.php \Drupal\workbench_moderation\Plugin\Validation\Constraint\ModerationState
Dynamic Entity Reference valid reference constraint.
Verifies that nodes have a valid moderation state.
Plugin annotation
@Constraint(
id = "ModerationState",
label = @Translation("Valid moderation state", context = "Validation")
)
Hierarchy
- class \Drupal\workbench_moderation\Plugin\Validation\Constraint\ModerationState extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of ModerationState
1 string reference to 'ModerationState'
- EntityTypeInfo::entityBundleFieldInfoAlter in src/
EntityTypeInfo.php - Force moderatable bundles to have a moderation_state field.
File
- src/
Plugin/ Validation/ Constraint/ ModerationState.php, line 17
Namespace
Drupal\workbench_moderation\Plugin\Validation\ConstraintView source
class ModerationState extends Constraint {
/**
* {@inheritdoc}
*/
public $message = 'Invalid state transition from %from to %to';
/**
* {@inheritdoc}
*/
public $accessDeniedMessage = 'You do not have access to transition from %from to %to';
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ModerationState:: |
public | property | ||
ModerationState:: |
public | property |