You are here

public function Custom::buildOptionsForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/field/Custom.php \Drupal\views\Plugin\views\field\Custom::buildOptionsForm()

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

Overrides FieldPluginBase::buildOptionsForm

File

core/modules/views/src/Plugin/views/field/Custom.php, line 53
Contains \Drupal\views\Plugin\views\field\Custom.

Class

Custom
A handler to provide a field that is completely custom by the administrator.

Namespace

Drupal\views\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);

  // Remove the checkbox
  unset($form['alter']['alter_text']);
  unset($form['alter']['text']['#states']);
  unset($form['alter']['help']['#states']);
  $form['#pre_render'][] = array(
    $this,
    'preRenderCustomForm',
  );
}