function views_random_seed_views_data in Views random seed 8
Same name and namespace in other branches
- 6 views_random_seed.module \views_random_seed_views_data()
- 7 views_random_seed.module \views_random_seed_views_data()
Implements hook_views_data()
File
- ./
views_random_seed.module, line 22 - Adds a random order handler with seed. If a constant integer argument N is specified, it is used as the seed value, which produces a repeatable sequence of column values. This makes it possible to have paging and not having items show up twice.
Code
function views_random_seed_views_data() {
$data['views']['random_seed'] = [
'title' => t('Random seed'),
'help' => t('Randomize the display order with a seed which makes paging possible.') . '<br />If you want to cache this view, use time-based caching.',
'sort' => [
'id' => 'views_random_seed_random',
],
];
return $data;
}