You are here

protected function EmailField::isModeratableEntityType in Workbench Email 8

Same name and namespace in other branches
  1. 2.x src/Plugin/RecipientType/EmailField.php \Drupal\workbench_email\Plugin\RecipientType\EmailField::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.

2 calls to EmailField::isModeratableEntityType()
EmailField::buildConfigurationForm in src/Plugin/RecipientType/EmailField.php
Generates a recipient types's settings form.
EntityReferenceUser::buildConfigurationForm in src/Plugin/RecipientType/EntityReferenceUser.php
Generates a recipient types's settings form.

File

src/Plugin/RecipientType/EmailField.php, line 229

Class

EmailField
Provides a recipient type of an email field.

Namespace

Drupal\workbench_email\Plugin\RecipientType

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);
  }
}