You are here

public function eck_views_handler_field_link::options_form in Entity Construction Kit (ECK) 7.3

Same name and namespace in other branches
  1. 7.2 views/handlers/eck_views_handler_field_link.inc \eck_views_handler_field_link::options_form()

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

views/handlers/eck_views_handler_field_link.inc, line 16
Field handler to present a link to the entity content.

Class

eck_views_handler_field_link

Code

public function options_form(&$form, &$form_state) {
  $form['text'] = array(
    '#type' => 'textfield',
    '#title' => t('Text to display'),
    '#default_value' => $this->options['text'],
  );
  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,
  );
}