You are here

function workflow_node_previous_state in Workflow 8

Same name and namespace in other branches
  1. 7.2 workflow.module \workflow_node_previous_state()
  2. 7 workflow.module \workflow_node_previous_state()

Gets the previous state ID of a given entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: An entity.

string $field_name: A field_name.

Return value

string The previous State ID.

File

./workflow.module, line 532
Support workflows made up of arbitrary states.

Code

function workflow_node_previous_state(EntityInterface $entity, $field_name = '') {
  return WorkflowManager::getPreviousStateId($entity, $field_name);
}