function ContentEntityForm::showRevisionUi

Checks whether the revision form fields should be added to the form.

Return value

bool TRUE if the form field should be added, FALSE otherwise.

4 calls to ContentEntityForm::showRevisionUi()
ContentEntityForm::buildEntity in core/lib/Drupal/Core/Entity/ContentEntityForm.php
Builds an updated entity object based upon the submitted form values.
ContentEntityForm::form in core/lib/Drupal/Core/Entity/ContentEntityForm.php
Gets the actual form array to be built.
ContentEntityForm::prepareEntity in core/lib/Drupal/Core/Entity/ContentEntityForm.php
Prepares the entity object before the form is built first.
OverridesEntityForm::init in core/modules/layout_builder/src/Form/OverridesEntityForm.php
Initializes the form state and the entity before the first form build.

File

core/lib/Drupal/Core/Entity/ContentEntityForm.php, line 477

Class

ContentEntityForm
Entity form variant for content entity types.

Namespace

Drupal\Core\Entity

Code

protected function showRevisionUi() {
  return $this->entity
    ->getEntityType()
    ->showRevisionUi();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.