You are here

public function ModerationInformation::loadBundleEntity in Workbench Moderation 8.2

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

Loads a specific bundle entity.

Parameters

string $bundle_entity_type_id: The bundle entity type ID.

string $bundle_id: The bundle ID.

Return value

\Drupal\Core\Config\Entity\ConfigEntityInterface|null

Overrides ModerationInformationInterface::loadBundleEntity

1 call to ModerationInformation::loadBundleEntity()
ModerationInformation::isModeratableBundle in src/ModerationInformation.php
Determines if an entity type/bundle is one that will be moderated.

File

src/ModerationInformation.php, line 72

Class

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

Namespace

Drupal\workbench_moderation

Code

public function loadBundleEntity($bundle_entity_type_id, $bundle_id) {
  if ($bundle_entity_type_id) {
    return $this->entityTypeManager
      ->getStorage($bundle_entity_type_id)
      ->load($bundle_id);
  }
}