protected function ConsentAgreementRevisionRevertForm::prepareRevertedRevision in General Data Protection Regulation 3.0.x
Same name and namespace in other branches
- 8.2 modules/gdpr_consent/src/Form/ConsentAgreementRevisionRevertForm.php \Drupal\gdpr_consent\Form\ConsentAgreementRevisionRevertForm::prepareRevertedRevision()
- 8 modules/gdpr_consent/src/Form/ConsentAgreementRevisionRevertForm.php \Drupal\gdpr_consent\Form\ConsentAgreementRevisionRevertForm::prepareRevertedRevision()
Prepares a revision to be reverted.
Parameters
\Drupal\gdpr_consent\Entity\ConsentAgreementInterface $revision: The revision to be reverted.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
\Drupal\gdpr_consent\Entity\ConsentAgreementInterface The prepared revision ready to be stored.
1 call to ConsentAgreementRevisionRevertForm::prepareRevertedRevision()
- ConsentAgreementRevisionRevertForm::submitForm in modules/
gdpr_consent/ src/ Form/ ConsentAgreementRevisionRevertForm.php - Form submission handler.
File
- modules/
gdpr_consent/ src/ Form/ ConsentAgreementRevisionRevertForm.php, line 149
Class
- ConsentAgreementRevisionRevertForm
- Provides a form for reverting a Consent Agreement revision.
Namespace
Drupal\gdpr_consent\FormCode
protected function prepareRevertedRevision(ConsentAgreementInterface $revision, FormStateInterface $form_state) {
$revision
->setNewRevision();
$revision
->isDefaultRevision(TRUE);
$revision
->setRevisionCreationTime(\Drupal::time()
->getRequestTime());
return $revision;
}