You are here

public function ModerationInformation::isModeratedEntityForm in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 src/ModerationInformation.php \Drupal\workbench_moderation\ModerationInformation::isModeratedEntityForm()

Determines if this form is for a moderated entity.

Parameters

\Drupal\Core\Form\FormInterface $form_object: The form definition object for this form.

Return value

bool TRUE if the form is for an entity that is subject to moderation, FALSE otherwise.

Overrides ModerationInformationInterface::isModeratedEntityForm

File

src/ModerationInformation.php, line 125

Class

ModerationInformation
General service for moderation-related questions about Entity API.

Namespace

Drupal\workbench_moderation

Code

public function isModeratedEntityForm(FormInterface $form_object) {
  return $form_object instanceof ContentEntityFormInterface && $this
    ->isModeratableEntity($form_object
    ->getEntity());
}