arch-8.x-1.x-dev/modules/order/templates/order.html.twig
modules/order/templates/order.html.twig
{#
/**
* @file
* Default theme implementation to display a order.
*
* Available variables:
* - order: The order entity with limited access to object properties and methods.
* Only method names starting with "get", "has", or "is" and a few common
* methods such as "id", "label", and "bundle" are available. For example:
* - order.getCreatedTime() will return the order creation timestamp.
* - order.hasField('field_example') returns TRUE if the order bundle includes
* field_example. (This does not indicate the presence of a value in this
* field.)
* - order.isPublished() will return whether the order is published or not.
* Calling other methods, such as order.delete(), will result in an exception.
* See \Drupal\arch_order\Entity\Order for a full list of public properties and
* methods for the order object.
* - label: The title of the order.
* - content: All order items. Use {{ content }} to print them all,
* or print a subset such as {{ content.field_example }}. Use
* {{ content|without('field_example') }} to temporarily suppress the printing
* of a given child element.
* - author_picture: The order author user entity, rendered using the "compact"
* view mode.
* - metadata: Metadata for this order.
* - date: Themed creation date field.
* - url: Direct URL of the current order.
* - attributes: HTML attributes for the containing element.
* The attributes.class element may contain one or more of the following
* classes:
* - order: The current template type (also known as a "theming hook").
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - content_attributes: Same as attributes, except applied to the main
* content tag that appears in the template.
* - author_attributes: Same as attributes, except applied to the author of
* the order tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
* - view_mode: View mode; for example, "teaser" or "full".
* - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
* - page: Flag for the full page state. Will be true if view_mode is 'full'.
* - readmore: Flag for more state. Will be true if the teaser content of the
* order cannot hold the main description content.
* - logged_in: Flag for authenticated user status. Will be true when the
* current user is a logged-in member.
* - is_admin: Flag for admin user status. Will be true when the current user
* is an administrator.
*
* @see template_preprocess_order()
*
* @todo Remove the id attribute (or make it a class), because if that gets
* rendered twice on a page this is invalid CSS for example: two lists
* in different view modes.
*
* @ingroup themeable
*/
#}
<article{{ attributes }}>
{{ title_prefix }}
{% if not page %}
<h2{{ title_attributes }}>
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
</h2>
{% endif %}
{{ title_suffix }}
<div{{ content_attributes }}>
{{ content }}
</div>
</article>
