protected function StateTransitionValidation::loadBundleEntity in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/StateTransitionValidation.php \Drupal\workbench_moderation\StateTransitionValidation::loadBundleEntity()
Loads a specific bundle entity.
Parameters
string $bundle_entity_type_id: The bundle entity type ID.
string $bundle_id: The bundle ID.
Return value
\Drupal\Core\Config\Entity\ConfigEntityInterface|null
2 calls to StateTransitionValidation::loadBundleEntity()
- StateTransitionValidation::getValidTransitions in src/
StateTransitionValidation.php - Gets a list of transitions that are legal for this user on this entity.
- StateTransitionValidation::getValidTransitionTargets in src/
StateTransitionValidation.php - Gets a list of states a user may transition an entity to.
File
- src/
StateTransitionValidation.php, line 277
Class
- StateTransitionValidation
- Validates whether a certain state transition is allowed.
Namespace
Drupal\workbench_moderationCode
protected function loadBundleEntity($bundle_entity_type_id, $bundle_id) {
if ($bundle_entity_type_id) {
return $this->entityTypeManager
->getStorage($bundle_entity_type_id)
->load($bundle_id);
}
}