You are here

public function LingotekContentModerationSettingsForm::needsColumn in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 8.2 src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  2. 3.0.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  3. 3.1.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  4. 3.2.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  5. 3.3.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  6. 3.4.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  7. 3.5.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  8. 3.6.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  9. 3.7.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()
  10. 3.8.x src/Moderation/LingotekContentModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekContentModerationSettingsForm::needsColumn()

Checks if there is a need for a moderation column.

Parameters

string $entity_type_id: The entity type id.

Return value

bool If the entity is enabled for moderation, return TRUE. FALSE otherwise.

Overrides LingotekModerationSettingsFormInterface::needsColumn

File

src/Moderation/LingotekContentModerationSettingsForm.php, line 99

Class

LingotekContentModerationSettingsForm
Moderation settings form for the Lingotek content_moderation integration.

Namespace

Drupal\lingotek\Moderation

Code

public function needsColumn($entity_type_id) {
  $entity_type_definition = $this->entityTypeManager
    ->getDefinition($entity_type_id);
  return $this->moduleHandler
    ->moduleExists('content_moderation') && ($this->moderationInfo !== NULL && $this->moderationInfo
    ->canModerateEntitiesOfEntityType($entity_type_definition));
}