You are here

public function fieldable_panels_panes_handler_field_view_entity::options_form in Fieldable Panels Panes (FPP) 7

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

Overrides views_handler_field::options_form

File

plugins/views/fieldable_panels_panes_handler_field_view_entity.inc, line 26
Provide views handlers for fieldable panel panes.

Class

fieldable_panels_panes_handler_field_view_entity
Field handler to present a link to the node.

Code

public function options_form(&$form, &$form_state) {
  $form['text'] = array(
    '#type' => 'textfield',
    '#title' => t('Text to display'),
    '#default_value' => $this->options['text'],
  );
  $form['hide_unless_reusable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide link for non-reusable panes'),
    '#description' => t("If you're using revision locking, it can be useful to hide links on non-reusable panes."),
    '#default_value' => $this->options['hide_unless_reusable'],
  );
  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,
  );
}