Paragraphs Editor
EditBufferItemInterface.php
Go to the documentation of this file.
1 <?php
2 
4 
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  */
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 }