You are here

public function ViewsReferencePager::alterFormField in Views Reference Field 8.2

Get the form field array.

Parameters

array $form_field: The form field array.

Overrides ViewsReferenceSettingInterface::alterFormField

File

src/Plugin/ViewsReferenceSetting/ViewsReferencePager.php, line 26

Class

ViewsReferencePager
The views reference setting pager plugin.

Namespace

Drupal\viewsreference\Plugin\ViewsReferenceSetting

Code

public function alterFormField(array &$form_field) {
  $form_field['#type'] = 'select';
  $form_field['#options'] = [
    '' => $this
      ->t('Default settings'),
    'full' => $this
      ->t('Full pager'),
    'mini' => $this
      ->t('Mini pager'),
    'some' => $this
      ->t('Hide pager (display a fixed number of items)'),
    'none' => $this
      ->t('Hide pager (display all items)'),
  ];
  $form_field['#weight'] = 35;
}