Time.php in Lightning Scheduler 8
File
src/Time.php
View source
<?php
namespace Drupal\lightning_scheduler;
use Drupal\Component\Datetime\Time as BaseTime;
use Drupal\Core\State\StateInterface;
use Symfony\Component\HttpFoundation\RequestStack;
final class Time extends BaseTime {
private $state;
public function __construct(RequestStack $request_stack, StateInterface $state) {
parent::__construct($request_stack);
$this->state = $state;
}
public function getRequestTime() {
return $this->state
->get('lightning_scheduler.request_time', parent::getRequestTime());
}
}
Classes
Name |
Description |
Time |
@internal
This is an internal part of Lightning Scheduler and may be changed or
removed at any time without warning. It should not be used by external
code in any way. |