function LongLivedSandboxSubscriber::updateLastCreatedTime

Same name and namespace in other branches
  1. main core/modules/package_manager/src/EventSubscriber/LongLivedSandboxSubscriber.php \Drupal\package_manager\EventSubscriber\LongLivedSandboxSubscriber::updateLastCreatedTime()

Updates state with the last time a create event ran.

Parameters

\Drupal\package_manager\Event\PostCreateEvent $event: The event being handled.

File

core/modules/package_manager/src/EventSubscriber/LongLivedSandboxSubscriber.php, line 77

Class

LongLivedSandboxSubscriber
Maintains state for the long-lived sandbox directory.

Namespace

Drupal\package_manager\EventSubscriber

Code

public function updateLastCreatedTime(PostCreateEvent $event) : void {
  $this->state
    ->set(static::STATE_KEY, $this->time
    ->getCurrentTime());
}

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