public static function WorkflowTransition::loadByProperties in Workflow 8
Load (Scheduled) WorkflowTransitions, most recent first.
Parameters
string $entity_type:
int $entity_id:
array $revision_ids:
string $field_name:
string $langcode:
string $sort:
string $transition_type:
Return value
\Drupal\workflow\Entity\WorkflowTransitionInterface Object representing one row from the {workflow_transition_history} table.
Overrides WorkflowTransitionInterface::loadByProperties
3 calls to WorkflowTransition::loadByProperties()
- WorkflowManager::getPreviousStateId in src/
Entity/ WorkflowManager.php - Gets the previous state ID of a given entity.
- WorkflowScheduledTransition::loadByProperties in src/
Entity/ WorkflowScheduledTransition.php - Load (Scheduled) WorkflowTransitions, most recent first.
- WorkflowTransition::save in src/
Entity/ WorkflowTransition.php - Saves the entity.
1 method overrides WorkflowTransition::loadByProperties()
- WorkflowScheduledTransition::loadByProperties in src/
Entity/ WorkflowScheduledTransition.php - Load (Scheduled) WorkflowTransitions, most recent first.
File
- src/
Entity/ WorkflowTransition.php, line 270
Class
- WorkflowTransition
- Implements an actual, executed, Transition.
Namespace
Drupal\workflow\EntityCode
public static function loadByProperties($entity_type, $entity_id, array $revision_ids = [], $field_name = '', $langcode = '', $sort = 'ASC', $transition_type = 'workflow_transition') {
$limit = 1;
$transitions = self::loadMultipleByProperties($entity_type, [
$entity_id,
], $revision_ids, $field_name, $langcode, $limit, $sort, $transition_type);
if ($transitions) {
$transition = reset($transitions);
return $transition;
}
return NULL;
}