You are here

function workflowfield_allowed_values in Workflow 7.2

Same name and namespace in other branches
  1. 7 workflow_field/workflowfield.field.inc \workflowfield_allowed_values()

Callback function for list.module formatter.

Returns array of allowed values when using a 'core' list formatter, instead of the 'workflow' formatter.

See also

list_allowed_values()

1 string reference to 'workflowfield_allowed_values'
WorkflowItem::getInfo in includes/Field/WorkflowItem.php
Function, that gets replaced by the 'annotations' in D8. (

File

workflow_field/workflowfield.field.inc, line 282
Defines a Workflow field, widget and formatter. (copied from list field).

Code

function workflowfield_allowed_values($field, $instance, $entity_type, $entity) {
  $workflow_field = new WorkflowItem($field, $instance, $entity_type, $entity);
  return $workflow_field
    ->getAllowedValues();
}