You are here

public function AlphaPaginationGroup::submitOptionsForm in Views Alpha Pagination 8.2

Performs some cleanup tasks on the options array before saving it.

Overrides FieldPluginBase::submitOptionsForm

File

src/Plugin/views/field/AlphaPaginationGroup.php, line 85

Class

AlphaPaginationGroup
A handler to provide a field that generates alpha pagination values.

Namespace

Drupal\alpha_pagination\Plugin\views\field

Code

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

  // Since this is an automated field, hide all form elements.
  foreach (Element::children($form) as $child) {

    // Allow the custom admin label since that's purely UI related.
    if ($child === 'more' || $child === 'ui_name') {
      continue;
    }
    $form[$child]['#access'] = FALSE;
  }
}