public function state_flow_entity_handler_field_link::options_form in State Machine 7.3
Default options form provides the label widget that all fields should have.
Overrides state_flow_entity_handler_field_state_flow_states::options_form
File
- modules/
state_flow_entity/ includes/ views/ state_flow_entity_handler_field_link.inc, line 23 - Field handler that provides actionable links related to an entity version.
Class
- state_flow_entity_handler_field_link
- @file Field handler that provides actionable links related to an entity version.
Code
public function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['link_type'] = array(
'#type' => 'select',
'#title' => t('Link type'),
'#description' => t('Creates a link to edit, delete or change the state of this entity revision.'),
'#options' => array(
'revision_edit_path' => 'edit',
'revision_delete_path' => 'delete',
'revision_translate_path' => 'translate',
'revision_workflow_path' => 'activate/workflow',
),
'#default_value' => $this->options['link_type'],
'#weight' => -102,
);
$form['link_text'] = array(
'#type' => 'textfield',
'#title' => t('Link text'),
'#description' => t('The text to display for this link'),
'#default_value' => $this->options['link_text'],
'#weight' => -102,
);
}