You are here

protected function TemplateForm::isModeratableBundle in Workbench Email 8

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

Determines if an entity type/bundle is one that will be moderated.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition to check.

string $bundle: The bundle to check.

Return value

bool TRUE if this is a bundle we want to moderate, FALSE otherwise.

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

File

src/Form/TemplateForm.php, line 347

Class

TemplateForm
Class TemplateForm.

Namespace

Drupal\workbench_email\Form

Code

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