You are here

protected function LingotekManagementFormBase::getTranslationsStatuses in Lingotek Translation 3.4.x

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

Gets the translation status of an entity in a format ready to display.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity.

Return value

array A render array.

1 call to LingotekManagementFormBase::getTranslationsStatuses()
LingotekManagementFormBase::getRow in src/Form/LingotekManagementFormBase.php
Gets a rows fo rendering based on the passed entity.

File

src/Form/LingotekManagementFormBase.php, line 1571

Class

LingotekManagementFormBase
Form for bulk management of content.

Namespace

Drupal\lingotek\Form

Code

protected function getTranslationsStatuses(ContentEntityInterface &$entity) {
  $statuses = $this->translationService
    ->getTargetStatuses($entity);
  return [
    'data' => [
      '#type' => 'lingotek_target_statuses',
      '#entity' => $entity,
      '#source_langcode' => $entity
        ->language()
        ->getId(),
      '#statuses' => $statuses,
    ],
  ];
}