lingotek-target-statuses.html.twig in Lingotek Translation 3.3.x
Same filename and directory in other branches
- 8.2 templates/lingotek-target-statuses.html.twig
- 4.0.x templates/lingotek-target-statuses.html.twig
- 3.0.x templates/lingotek-target-statuses.html.twig
- 3.1.x templates/lingotek-target-statuses.html.twig
- 3.2.x templates/lingotek-target-statuses.html.twig
- 3.4.x templates/lingotek-target-statuses.html.twig
- 3.5.x templates/lingotek-target-statuses.html.twig
- 3.6.x templates/lingotek-target-statuses.html.twig
- 3.7.x templates/lingotek-target-statuses.html.twig
- 3.8.x templates/lingotek-target-statuses.html.twig
Default theme implementation of the Lingotek target statuses.
Available variables:
- entity: The entity which status we want to display.
- source_langcode: The language code.
- statuses: The source statuses, keyed by language code. The keys are:
- status: The status for that translation.
- url: An optional \Drupal\Core\Url object.
- new_window: A flag indicating if the link should be opened in a new window.
- status_text: The status text, mainly though for link title.
- language: The language code.
1 theme call to lingotek-target-statuses.html.twig
- LingotekTargetStatuses::getInfo in src/
Element/ LingotekTargetStatuses.php - Returns the element properties for this element.
File
templates/lingotek-target-statuses.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation of the Lingotek target statuses.
- *
- * Available variables:
- * - entity: The entity which status we want to display.
- * - source_langcode: The language code.
- * - statuses: The source statuses, keyed by language code. The keys are:
- * - status: The status for that translation.
- * - url: An optional \Drupal\Core\Url object.
- * - new_window: A flag indicating if the link should be opened in a new window.
- * - status_text: The status text, mainly though for link title.
- * - language: The language code.
- *
- * @see template_preprocess()
- * @see template_preprocess_lingotek_target_statuses()
- *
- * @ingroup themeable
- */
- #}
- {% for status in statuses %}{% if status.url %}<a href="{{ status.url }}"{%if status.new_window%} target="_blank"{%endif%}{%else%}<span{%endif%} class="language-icon target-{{status.status|lower}}" title="{{status.status_text}}">{{status.language|upper}}{%if status.url%}</a>{%else%}</span>{%endif%}{% endfor %}