Paragraphs Editor
Main Page
Namespaces
Classes
Files
File List
EditBufferItemInterface.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Drupal\paragraphs_editor\EditBuffer
;
4
5
use
Drupal\paragraphs\ParagraphInterface
;
6
7
/**
8
* Represents an item in an edit buffer.
9
*
10
* Edit buffer items contain an instance of a paragraph entity with all the
11
* unsaved edits that have been made for that entity. The widget binder library
12
* will use an edit buffer item to couple the drupal entity to a widget in the
13
* editor.
14
*/
15
interface
EditBufferItemInterface
{
16
17
/**
18
* Gets the paragraph entity that is wrapped by this item.
19
*
20
* @return \Drupal\paragraphs\ParagraphInterface
21
* The paragraph entity that is wrapped by this item, containing any edits
22
* that have been saved to the buffer.
23
*/
24
public
function
getEntity
();
25
26
/**
27
* Replaces the paragraph entity wrapped by this item with another paragraph.
28
*/
29
public
function
overwrite
(ParagraphInterface $entity);
30
31
/**
32
* Saves the edits in this buffer item to the edit buffer cache.
33
*/
34
public
function
save
();
35
36
}
Drupal\paragraphs_editor\EditBuffer
Definition:
EditBuffer.php:3
Drupal\paragraphs_editor\EditBuffer\EditBufferItemInterface\save
save()
ParagraphInterface
Drupal\paragraphs_editor\EditBuffer\EditBufferItemInterface\getEntity
getEntity()
Drupal\paragraphs_editor\EditBuffer\EditBufferItemInterface
Definition:
EditBufferItemInterface.php:15
Drupal\paragraphs_editor\EditBuffer\EditBufferItemInterface\overwrite
overwrite(ParagraphInterface $entity)
src
EditBuffer
EditBufferItemInterface.php
Generated by
1.8.11