protected function LingotekManagementFormBase::getTranslationsStatuses in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 4.0.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.0.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.1.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.2.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.3.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.5.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.6.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 3.7.x src/Form/LingotekManagementFormBase.php \Drupal\lingotek\Form\LingotekManagementFormBase::getTranslationsStatuses()
- 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\FormCode
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,
],
];
}