You are here

protected function ViewsRandomSeedRandom::defineOptions in Views random seed 8

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides SortPluginBase::defineOptions

File

src/Plugin/views/sort/ViewsRandomSeedRandom.php, line 53

Class

ViewsRandomSeedRandom
Handle a random sort with seed.

Namespace

Drupal\views_random_seed\Plugin\views\sort

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['reuse_seed'] = [
    'default' => '',
  ];
  $options['user_seed_type'] = [
    'default' => 'same_per_user',
  ];
  $options['anonymous_session'] = [
    'default' => FALSE,
  ];
  $options['reset_seed_int'] = [
    'default' => '3600',
  ];
  $options['reset_seed_custom'] = [
    'default' => '300',
  ];
  return $options;
}