You are here

public function LingotekWorkbenchModerationSettingsForm::needsColumn in Lingotek Translation 3.2.x

Same name and namespace in other branches
  1. 8.2 src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  2. 4.0.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  3. 3.1.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  4. 3.3.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  5. 3.4.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  6. 3.5.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  7. 3.6.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  8. 3.7.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::needsColumn()
  9. 3.8.x src/Moderation/LingotekWorkbenchModerationSettingsForm.php \Drupal\lingotek\Moderation\LingotekWorkbenchModerationSettingsForm::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/LingotekWorkbenchModerationSettingsForm.php, line 86

Class

LingotekWorkbenchModerationSettingsForm
Moderation settings form for the Lingotek workbench_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('workbench_moderation') && ($this->moderationInfo !== NULL && $this->moderationInfo
    ->isModeratableEntityType($entity_type_definition));
}