Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / ctools / src / SerializableTempstoreFactory.php
1 <?php
2
3 namespace Drupal\ctools;
4
5 use Drupal\user\SharedTempStoreFactory;
6
7 /**
8  * A factory for creating SerializableTempStore objects.
9  */
10 class SerializableTempstoreFactory extends SharedTempStoreFactory {
11
12   /**
13    * {@inheritdoc}
14    */
15   function get($collection, $owner = NULL) {
16     // Use the currently authenticated user ID or the active user ID unless the
17     // owner is overridden.
18     if (!isset($owner)) {
19       $owner = \Drupal::currentUser()->id() ?: session_id();
20     }
21
22     // Store the data for this collection in the database.
23     $storage = $this->storageFactory->get("user.shared_tempstore.$collection");
24     return new SerializableTempstore($storage, $this->lockBackend, $owner, $this->requestStack, $this->expire);
25   }
26
27 }