workflow-transition.html.twig in Workflow 8
Default theme implementation for comments.
Available variables:
- author: Comment author. Can be a link or plain text.
- content: The content-related items for the workflow transition display. Use {{ content }} to print them all, or print a subset such as {{ content.field_example }}. Use the following code to temporarily suppress the printing of a given child element:
{{ content|without('field_example') }}
- time: Formatted date and time for when the workflow transition was created.
- from_state: State object, you can display label via from_state.label.
- to_state: State object, you can display label via to_state.label.
- user: User object.
See also
File
templates/workflow-transition.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for comments.
- *
- * Available variables:
- * - author: Comment author. Can be a link or plain text.
- * - content: The content-related items for the workflow transition display. Use
- * {{ content }} to print them all, or print a subset such as
- * {{ content.field_example }}. Use the following code to temporarily suppress
- * the printing of a given child element:
- * @code
- * {{ content|without('field_example') }}
- * @endcode
- * - time: Formatted date and time for when the workflow transition was created.
- * - from_state: State object, you can display label via from_state.label.
- * - to_state: State object, you can display label via to_state.label.
- * - user: User object.
- *
- * @see template_preprocess_workflow_transition()
- *
- * @ingroup themeable
- */
- #}
-
- <article{{ attributes }}>
- <div class="status">
- {% trans %}From {{ from_state.label }} to {{ to_state.label }} at {{ time }} via {{ user.label }}{% endtrans %}
- </div>
- {% if comment %}
- <div class="comment">
- {% trans %}Comment{% endtrans %}: {{ comment }}
- </div>
- {% endif %}
-
- {% if content %}
- {{ content }}
- {% endif %}
- </article>