function State::labelCallback

Same name and namespace in other branches
  1. 9 core/modules/workflows/src/State.php \Drupal\workflows\State::labelCallback()
  2. 10 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:

Return value

string The label of the state.

File

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

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.