You are here

protected function TemplateForm::isModeratableEntityType in Workbench Email 8

Same name and namespace in other branches
  1. 2.x src/Form/TemplateForm.php \Drupal\workbench_email\Form\TemplateForm::isModeratableEntityType()

Determines if an entity type has been marked as moderatable.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: An entity type object.

Return value

bool TRUE if this entity type has been marked as moderatable, FALSE otherwise.

1 call to TemplateForm::isModeratableEntityType()
TemplateForm::form in src/Form/TemplateForm.php
Gets the actual form array to be built.

File

src/Form/TemplateForm.php, line 327

Class

TemplateForm
Class TemplateForm.

Namespace

Drupal\workbench_email\Form

Code

protected function isModeratableEntityType(EntityTypeInterface $entity_type) {
  if (method_exists($this->moderationInfo, 'isModeratableEntityType')) {
    return $this->moderationInfo
      ->isModeratableEntityType($entity_type);
  }
  else {
    return $this->moderationInfo
      ->canModerateEntitiesOfEntityType($entity_type);
  }
}