public function KeyValueStoreExpirable::setTimeService in MongoDB 8.2
Inject the time service. Cannot do it in the constructor for compatibility.
Parameters
\Drupal\Component\Datetime\TimeInterface $time: The datetime.time service.
File
- modules/
mongodb_storage/ src/ KeyValueStoreExpirable.php, line 99
Class
- KeyValueStoreExpirable
- KeyValueStore provides a KeyValueStoreExpirable as a MongoDB collection.
Namespace
Drupal\mongodb_storageCode
public function setTimeService(TimeInterface $time) {
$this->time = $time;
}