You are here

protected function TempStoreTrait::getTempStoreFactory in Rules 8.3

Retrieves the temporary storage service if not already present.

Return value

\Drupal\Core\TempStore\SharedTempStoreFactory The factory.

File

src/Ui/TempStoreTrait.php, line 82

Class

TempStoreTrait
Provides methods for modified rules components in temporary storage.

Namespace

Drupal\rules\Ui

Code

protected function getTempStoreFactory() {
  if (!isset($this->tempStoreFactory)) {
    $this->tempStoreFactory = \Drupal::service('tempstore.shared');
  }
  return $this->tempStoreFactory;
}