You are here

protected function ShowMore::defineOptions in Views Show More 8

Options definition overwrite.

Overrides SqlBase::defineOptions

File

src/Plugin/views/pager/ShowMore.php, line 44

Class

ShowMore
The plugin to handle show more pager.

Namespace

Drupal\views_show_more\Plugin\views\pager

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['result_display_method'] = [
    'default' => 'append',
  ];
  $options['initial'] = [
    'default' => 0,
  ];
  $options['show_more_text'] = [
    'default' => $this
      ->t('Show more'),
    'translatable' => TRUE,
  ];
  $options['show_more_empty_text'] = [
    'default' => '',
    'translatable' => TRUE,
  ];
  $options['effects'] = [
    'contains' => [
      'type' => [
        'default' => 'none',
      ],
      'speed_type' => [
        'default' => '',
      ],
      'speed' => [
        'default' => '',
      ],
      'speed_value' => [
        'default' => '',
      ],
      'scroll_offset' => [
        'default' => '50',
      ],
    ],
  ];
  $options['advance'] = [
    'contains' => [
      'content_selector' => [
        'default' => '',
      ],
      'pager_selector' => [
        'default' => '',
      ],
    ],
  ];
  return $options;
}