protected function LibraryItemRevisionRevertForm::prepareRevertedRevision

Prepares a revision to be reverted.

Parameters

\Drupal\paragraphs_library\LibraryItemInterface $library_item_revision: The revision to be reverted.

Return value

\Drupal\paragraphs_library\LibraryItemInterface The prepared revision ready to be stored.

1 call to LibraryItemRevisionRevertForm::prepareRevertedRevision()
LibraryItemRevisionRevertForm::submitForm in paragraphs/modules/paragraphs_library/src/Form/LibraryItemRevisionRevertForm.php

File

paragraphs/modules/paragraphs_library/src/Form/LibraryItemRevisionRevertForm.php, line 130

Class

LibraryItemRevisionRevertForm

Namespace

Drupal\paragraphs_library\Form

Code

protected function prepareRevertedRevision(LibraryItemInterface $library_item_revision) {
  $library_item_revision
    ->setNewRevision();
  $library_item_revision
    ->isDefaultRevision(TRUE);
  return $library_item_revision;
}