You are here

public function SeedCalculator::__construct in Views random seed 8

SeedCalculator constructor.

Parameters

\Drupal\Component\Datetime\Time $time:

\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $keyValueFactory:

\Drupal\Core\Session\AccountInterface $current_user:

File

src/SeedCalculator.php, line 52

Class

SeedCalculator
Calculates seeds.

Namespace

Drupal\views_random_seed

Code

public function __construct(Time $time, KeyValueFactoryInterface $keyValueFactory, AccountInterface $current_user) {
  $this->serverTime = $time;
  $this->keyValueStore = $keyValueFactory
    ->get('views_random_seed');
  $this->currentUser = $current_user;
}