Paragraphs Editor
Main Page
Namespaces
Classes
Files
File List
EditBufferCacheInterface.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Drupal\paragraphs_editor\EditBuffer
;
4
5
use
Drupal\Core\Entity\EntityInterface
;
6
7
/**
8
* Represents a persistent storage mechanism for storing edit buffers.
9
*/
10
interface
EditBufferCacheInterface
{
11
12
/**
13
* Gets an edit buffer by context id.
14
*
15
* @param string $context_string
16
* The id of the context the buffer is associated with.
17
*
18
* @return \Drupal\paragraphs_editor\EditBuffer\EditBufferInterface
19
* The retrieved edit buffer.
20
*/
21
public
function
get
($context_string);
22
23
/**
24
* Removes an edit buffer from the cache.
25
*
26
* @param string $context_string
27
* The id of the context the buffer to be destroyed is associated with.
28
*/
29
public
function
delete
($context_string);
30
31
/**
32
* Saves an edit buffer in the cache.
33
*
34
* @param \Drupal\paragraphs_editor\EditBuffer\EditBufferInterface $buffer
35
* The buffer to be saved.
36
*/
37
public
function
save
(
EditBufferInterface
$buffer);
38
39
/**
40
* Deletes all buffers from the cache that are related to an entity.
41
*
42
* @param \Drupal\Core\Entity\EntityInterface $entity
43
* The entity to delete all related buffers for.
44
*/
45
public
function
processDeletionQueue
(EntityInterface $entity);
46
47
/**
48
* Relates an edit buffer with an entity.
49
*
50
* If the entity is deleted or saved during the page request, any edit buffers
51
* that were assocaited with it will be deleted.
52
*
53
* @param \Drupal\Core\Entity\EntityInterface $entity
54
* The entity to associate the edit buffer with.
55
* @param \Drupal\paragraphs_editor\EditBuffer\EditBufferInterface $buffer
56
* The buffer to associate.
57
*/
58
public
function
queueDeletion
(EntityInterface $entity,
EditBufferInterface
$buffer);
59
60
}
Drupal\paragraphs_editor\EditBuffer\EditBufferCacheInterface\processDeletionQueue
processDeletionQueue(EntityInterface $entity)
Drupal\paragraphs_editor\EditBuffer
Definition:
EditBuffer.php:3
EntityInterface
Drupal\paragraphs_editor\EditBuffer\EditBufferCacheInterface
Definition:
EditBufferCacheInterface.php:10
Drupal\paragraphs_editor\EditBuffer\EditBufferInterface
Definition:
EditBufferInterface.php:14
Drupal\paragraphs_editor\EditBuffer\EditBufferCacheInterface\queueDeletion
queueDeletion(EntityInterface $entity, EditBufferInterface $buffer)
Drupal\paragraphs_editor\EditBuffer\EditBufferCacheInterface\save
save(EditBufferInterface $buffer)
src
EditBuffer
EditBufferCacheInterface.php
Generated by
1.8.11