restExportDisplayOptions example

$display_options['feed'] = $this->pageFeedDisplayOptions($form$form_state);
      }
    }

    // Display: Block     if (!$form_state->isValueEmpty(['block', 'create'])) {
      $display_options['block'] = $this->blockDisplayOptions($form$form_state);
    }

    // Display: REST export.     if (!$form_state->isValueEmpty(['rest_export', 'create'])) {
      $display_options['rest_export'] = $this->restExportDisplayOptions($form$form_state);
    }

    return $display_options;
  }

  /** * Alters the full array of display options before they are added to the view. */
  protected function alterDisplayOptions(&$display_options$form, FormStateInterface $form_state) {
    foreach ($display_options as $display_type => $options) {
      // Allow style plugins to hook in and provide some settings.
Home | Imprint | This part of the site doesn't use cookies.