function State::labelCallback

Same name in other branches
  1. 9 core/modules/workflows/src/State.php \Drupal\workflows\State::labelCallback()
  2. 8.9.x core/modules/workflows/src/State.php \Drupal\workflows\State::labelCallback()
  3. 11.x core/modules/workflows/src/State.php \Drupal\workflows\State::labelCallback()

Helper method to convert a State value object to a label.

Parameters

\Drupal\workflows\StateInterface $state: The state.

Return value

string The label of the state.

File

core/modules/workflows/src/State.php, line 111

Class

State
A value object representing a workflow state.

Namespace

Drupal\workflows

Code

public static function labelCallback(StateInterface $state) {
    return $state->label();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.