function views_handler_field_user_relationships_action::options_form in User Relationships 7
Default options form provides the label widget that all fields should have.
Overrides views_handler_field::options_form
File
- user_relationship_views/
views_handler_field_user_relationships_action.inc, line 16
Class
- views_handler_field_user_relationships_action
- Field handler to present an 'approve' link for a given claim.
Code
function options_form(&$form, &$form_state) {
$options = array();
foreach (user_relationships_types_load() as $rid => $relationship) {
$options[$rid] = $relationship->name;
}
$form['ur-type'] = array(
'#type' => 'radios',
'#title' => t('User Relationship Type'),
'#options' => $options,
'#default_value' => $this->options['ur-type'],
);
$form['ur-actions'] = array(
'#type' => 'checkboxes',
'#title' => t('Actions'),
'#options' => array(
'add' => t('Add'),
'remove' => t('Remove'),
'requested' => t('Requested'),
'received' => t('Received'),
),
'#default_value' => $this->options['ur-actions'],
);
parent::options_form($form, $form_state);
// The path is set by render_link function so don't allow to set it.
$form['alter']['path'] = array(
'#access' => FALSE,
);
$form['alter']['external'] = array(
'#access' => FALSE,
);
}