function Time::__construct

Same name in this branch
  1. 11.x core/modules/views/src/Plugin/views/cache/Time.php \Drupal\views\Plugin\views\cache\Time::__construct()
Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/cache/Time.php \Drupal\views\Plugin\views\cache\Time::__construct()
  2. 9 core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::__construct()
  3. 8.9.x core/modules/views/src/Plugin/views/cache/Time.php \Drupal\views\Plugin\views\cache\Time::__construct()
  4. 8.9.x core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::__construct()
  5. 10 core/modules/views/src/Plugin/views/cache/Time.php \Drupal\views\Plugin\views\cache\Time::__construct()
  6. 10 core/lib/Drupal/Component/Datetime/Time.php \Drupal\Component\Datetime\Time::__construct()

Constructs a Time object.

Parameters

\Symfony\Component\HttpFoundation\RequestStack|null $request_stack: (Optional) The request stack.

File

core/lib/Drupal/Component/Datetime/Time.php, line 34

Class

Time
Provides a class for obtaining system time.

Namespace

Drupal\Component\Datetime

Code

public function __construct(?RequestStack $request_stack = NULL) {
    $this->requestStack = $request_stack;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.