Pathauto and dependencies
This commit is contained in:
parent
4b1a293d57
commit
24ffcb956b
257 changed files with 29510 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\ctools;
|
||||
|
||||
use Drupal\user\SharedTempStoreFactory;
|
||||
|
||||
/**
|
||||
* A factory for creating SerializableTempStore objects.
|
||||
*/
|
||||
class SerializableTempstoreFactory extends SharedTempStoreFactory {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
function get($collection, $owner = NULL) {
|
||||
// Use the currently authenticated user ID or the active user ID unless the
|
||||
// owner is overridden.
|
||||
if (!isset($owner)) {
|
||||
$owner = \Drupal::currentUser()->id() ?: session_id();
|
||||
}
|
||||
|
||||
// Store the data for this collection in the database.
|
||||
$storage = $this->storageFactory->get("user.shared_tempstore.$collection");
|
||||
return new SerializableTempstore($storage, $this->lockBackend, $owner, $this->requestStack, $this->expire);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in a new issue