public function ModerationInformation::shouldModerateConfigEntity in Config Entity Revisions 8.2
Whether this type of config entity has moderation enabled.
Parameters
string $entity: The configuration entity.
Return value
bool Whether the config entity type is moderated.
1 call to ModerationInformation::shouldModerateConfigEntity()
- ModerationInformation::isModeratedEntity in src/
ModerationInformation.php - Determines if an entity is moderated.
File
- src/
ModerationInformation.php, line 88
Class
- ModerationInformation
- Class ModerationInformation.
Namespace
Drupal\config_entity_revisionsCode
public function shouldModerateConfigEntity($entity) {
if ($this
->canModerateEntitiesOfEntityType($entity
->getEntityType())) {
$bundles = $this->bundleInfo
->getBundleInfo('config_entity_revisions');
$key = $entity
->getBundleName();
return isset($bundles[$key]['workflow']);
}
return FALSE;
}