Time.php in Lightning Workflow 8.3
File
modules/lightning_scheduler/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;
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 |
Decorates the time service to facilitate testing. |