1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- /**
- * @file
- * Workflow - New Generation
- *
- * - States are entities
- * - Worfklows are the bundle entities of states
- * - Transitions are specific fields from state to role_id+state
- * - Any entity type can be subject to a workflow: association is represented by
- * an entityreference field with specific widget/formatter.
- */
- function wing_field_info() {
- $ret = array(
- 'wing_transition' => array(
- 'label' => t('Wing: Transition'),
- 'description' => t('Store access from one workflow state to another.'),
- 'settings' => array(),
- 'instance_settings' => array(),
- 'default_widget' => 'text_textfield',
- 'default_formatter' => 'text_default',
- // 'default_widget' => 'wing_transition_widget',
- // 'default_formatter' => 'wing_transition_default',
- // 'no_ui' => FALSE,
- ),
- );
- dsm($ret);
- return $ret;
- }
- function wing_field_widget_info() {
- $ret = array(
- 'text_textfield' => array(
- 'label' => t('Text field'),
- 'field types' => array('text'),
- 'settings' => array('size' => 60),
- 'behaviors' => array(
- 'multiple values' => FIELD_BEHAVIOR_DEFAULT,
- 'default value' => FIELD_BEHAVIOR_DEFAULT,
- ),
- ),
- );
- return $ret;
- }
- /**
- * Implements hook_field_widget_info_alter().
- */
- function wing_field_widget_info_alter(&$info) {
- if (module_exists('text')) {
- $info['text_textfield']['field types'][] = 'wing_transition';
- }
- }
|