You are here

function workflow_state_allowed_values in Workflow 8

Returns the allowed values for a field.

This function is a residue for installations that have v8.x-1.0 The setting for options_allowed_values is still in the Field configuration Saving the field data again does not remove the settings. So, we copy code from options_allowed_values().

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $definition:

Return value

mixed

File

./workflow.field.inc, line 140
Defines a Workflow field, widget and formatter. (copied from list field).

Code

function workflow_state_allowed_values(FieldStorageDefinitionInterface $definition) {
  $values = $definition
    ->getSetting('allowed_values');
  return $values;
}