public function LingotekTargetStatuses::preRender in Lingotek Translation 8.2
Same name and namespace in other branches
- 4.0.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.0.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.1.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.2.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.3.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.4.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.5.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.6.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.7.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
- 3.8.x src/Element/LingotekTargetStatuses.php \Drupal\lingotek\Element\LingotekTargetStatuses::preRender()
Calculates the url and status title and adds them to the render array.
Parameters
array $element: The element as a render array.
Return value
array The element as a render array.
File
- src/
Element/ LingotekTargetStatuses.php, line 48
Class
- LingotekTargetStatuses
- Provides a Lingotek target status element.
Namespace
Drupal\lingotek\ElementCode
public function preRender(array $element) {
$statuses = $this
->getTranslationsStatuses($element['#entity'], $element['#source_langcode'], $element['#statuses']);
$element['#statuses'] = $statuses;
return $element;
}