| Total Complexity | 4 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class EditBufferItem implements EditBufferItemInterface { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * The wrapped entity, containing any edits. |
||
| 14 | * |
||
| 15 | * @var \Drupal\paragraphs\ParagraphInterface |
||
| 16 | */ |
||
| 17 | protected $entity; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The buffer that will be used to store the edits. |
||
| 21 | * |
||
| 22 | * @var \Drupal\paragraphs_editor\EditBuffer\EditBufferInterface |
||
| 23 | */ |
||
| 24 | protected $buffer; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Creates an edit buffer item. |
||
| 28 | * |
||
| 29 | * @param \Drupal\paragraphs\ParagraphInterface $entity |
||
| 30 | * The entity to wrap. |
||
| 31 | * @param \Drupal\paragraphs_editor\EditBuffer\EditBufferInterface $buffer |
||
| 32 | * The buffer that will store edits. |
||
| 33 | */ |
||
| 34 | public function __construct(ParagraphInterface $entity, EditBufferInterface $buffer) { |
||
| 35 | $this->entity = $entity; |
||
| 36 | $this->buffer = $buffer; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function getEntity() { |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function overwrite(ParagraphInterface $entity) { |
||
| 50 | $this->entity = $entity; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritdoc} |
||
| 55 | */ |
||
| 56 | public function save() { |
||
| 58 | } |
||
| 59 | |||
| 61 |