arch-8.x-1.x-dev/modules/order/templates/order-line-items--advanced.html.twig

modules/order/templates/order-line-items--advanced.html.twig
{#
/**
 * @file
 * Default theme implementation to display order line items.
 *
 * 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.
 * - products: Product entities 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.
 * - label: The title of the order.
 * - url: Direct URL of the current order.
 * - attributes: HTML attributes for the containing element.
 *
 * @see template_preprocess_order_line_items__advanced()
 *
 * @ingroup themeable
 */
#}
{% set extra_fields = ['product_image', 'product_name', 'product_sku'] %}
<section{{ attributes }}>
  {% for row in rows %}
  <div class="order--line-item">
    {% for key in extra_fields %}
    <span class="col--{{ key }}">{{ row[key] }}</span>
    {% endfor %}
    {% for key, col_content in row|without('product_image', 'product_name', 'product_sku') %}
    <span class="col--{{ key }}">{{ col_content }}</span>
    {% endfor %}
  </div>
  {% endfor %}

</section>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc