eca-1.0.x-dev/modules/base/src/Plugin/Action/SharedTempStoreRead.php

modules/base/src/Plugin/Action/SharedTempStoreRead.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
 
namespace Drupal\eca_base\Plugin\Action;
 
use Drupal\Core\TempStore\SharedTempStore;
 
/**
 * Action to read value from shared temp store and store the result as a token.
 *
 * @Action(
 *   id = "eca_sharedtempstore_read",
 *   label = @Translation("Shared temporary store: read"),
 *   description = @Translation("Reads a value from the Drupal shared temporary store by the given key. The result is stored in a token."),
 *   eca_version_introduced = "2.0.0"
 * )
 */
class SharedTempStoreRead extends KeyValueStoreBase {
 
  /**
   * {@inheritdoc}
   */
  protected function store(string $collection): SharedTempStore {
    return $this->sharedTempStoreFactory->get($collection);
  }
 
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc