You are here

public static function WorkflowItem::getInfo in Workflow 7.2

Same name and namespace in other branches
  1. 7 includes/Field/WorkflowItem.php \WorkflowItem::getInfo()

Function, that gets replaced by the 'annotations' in D8. (

See also

comments above this class)

2 calls to WorkflowItem::getInfo()
workflowfield_field_info in workflow_field/workflowfield.field.inc
Implements hook_field_info().
WorkflowItem::settingsForm in includes/Field/WorkflowItem.php
Implements hook_field_settings_form() -> ConfigFieldItemInterface::settingsForm().

File

includes/Field/WorkflowItem.php, line 25
Contains workflow\includes\Field\WorkflowItem.

Class

WorkflowItem
Plugin implementation of the 'workflow' field type.

Code

public static function getInfo() {
  return array(
    'workflow' => array(
      'label' => t('Workflow'),
      'description' => t("This field stores Workflow values for a certain Workflow type from a list of allowed 'value => label' pairs, i.e. 'Publishing': 1 => unpublished, 2 => draft, 3 => published."),
      'settings' => array(
        'allowed_values_function' => 'workflowfield_allowed_values',
        // For the list.module formatter
        // 'allowed_values_function' => 'WorkflowItem::getAllowedValues', // For the list.module formatter.
        'wid' => '',
        // 'history' => 1,
        // 'schedule' => 0,
        // 'comment' => 0,
        'widget' => array(
          'options' => 'select',
          'name_as_title' => 1,
          'fieldset' => 0,
          'hide' => 0,
          'schedule' => 1,
          'schedule_timezone' => 1,
          'comment' => 1,
        ),
        'watchdog_log' => 1,
        'history' => array(
          'history_tab_show' => 1,
          'roles' => array(),
        ),
      ),
      'instance_settings' => array(),
      'default_widget' => 'workflow',
      'default_formatter' => 'list_default',
      // Properties are introduced in Entity API and used for Rules integration.
      'property_type' => WORKFLOWFIELD_PROPERTY_TYPE,
      'property_callbacks' => array(
        'workflowfield_property_info_callback',
      ),
    ),
  );
}