You are here

function workflowfield_property_info_callback in Workflow 7.2

Implements property_callbacks for hook_field_info().

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

File

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

Code

function workflowfield_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {
  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
  $property['getter callback'] = 'entity_metadata_field_property_get';
  $property['getter callback'] = '_workflowfield_metadata_property_get';

  // $property['setter callback'] = 'entity_metadata_field_property_set';
  // $property['setter callback'] = '_workflowfield_metadata_property_set';
  $property['options list'] = 'entity_metadata_field_options_list';
  $property['property info'] = array(
    'value' => array(
      'type' => 'integer',
      'label' => t('State ID'),
      'setter callback' => 'entity_property_verbatim_set',
    ),
    'workflow' => array(
      'type' => 'array',
      'label' => t('Workflow details'),
      'setter callback' => 'entity_property_verbatim_set',
    ),
  );
}