Skip to content

Commit

Permalink
[Shared] add priorities to twig hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMilek committed Oct 16, 2024
1 parent 372e14c commit 429c7c8
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,22 @@ sylius_twig_hooks:
'sylius_shop.shared.address':
company:
template: "@SyliusShop/shared/address/company.html.twig"
priority: 600
name:
template: "@SyliusShop/shared/address/name.html.twig"
priority: 500
phone_number:
template: "@SyliusShop/shared/address/phone_number.html.twig"
priority: 400
street:
template: "@SyliusShop/shared/address/street.html.twig"
priority: 300
city_and_postcode:
template: "@SyliusShop/shared/address/city_and_postcode.html.twig"
priority: 200
province:
template: "@SyliusShop/shared/address/province.html.twig"
priority: 100
country:
template: "@SyliusShop/shared/address/country.html.twig"
priority: 0
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ sylius_twig_hooks:
'sylius_shop.shared.error':
layout:
template: '@SyliusShop/shared/error/layout.html.twig'
priority: 0

'sylius_shop.shared.error.layout':
logo:
template: '@SyliusShop/shared/error/layout/logo.html.twig'
priority: 100
message:
template: '@SyliusShop/shared/error/layout/message.html.twig'
priority: 0
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,33 @@ sylius_twig_hooks:
'sylius_shop.shared.form.address':
name:
template: '@SyliusShop/shared/form/address/name.html.twig'
priority: 700
company:
template: '@SyliusShop/shared/form/address/company.html.twig'
priority: 600
street:
template: '@SyliusShop/shared/form/address/street.html.twig'
priority: 500
country:
template: '@SyliusShop/shared/form/address/country.html.twig'
priority: 400
province:
template: '@SyliusShop/shared/form/address/province.html.twig'
priority: 300
city:
template: '@SyliusShop/shared/form/address/city.html.twig'
priority: 200
postcode:
template: '@SyliusShop/shared/form/address/postcode.html.twig'
priority: 100
phone_number:
template: '@SyliusShop/shared/form/address/phone_number.html.twig'
priority: 0

'sylius_shop.shared.form.address.name':
first_name:
template: '@SyliusShop/shared/form/address/name/first_name.html.twig'
priority: 100
last_name:
template: '@SyliusShop/shared/form/address/name/last_name.html.twig'
priority: 0
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,35 @@ sylius_twig_hooks:
'sylius_shop.shared.form.select_payment':
payment:
template: '@SyliusShop/shared/form/select_payment/payment.html.twig'
priority: 0

'sylius_shop.shared.form.select_payment.payment':
header:
template: '@SyliusShop/shared/form/select_payment/payment/header.html.twig'
priority: 100
choice:
template: '@SyliusShop/shared/form/select_payment/payment/choice.html.twig'
priority: 0

'sylius_shop.shared.form.select_payment.payment#unavailable':
unavailable:
template: '@SyliusShop/shared/form/select_payment/unavailable.html.twig'
priority: 0

'sylius_shop.shared.form.select_payment.payment.choice':
details:
template: '@SyliusShop/shared/form/select_payment/payment/choice/details.html.twig'
priority: 0

'sylius_shop.shared.form.select_payment.payment.choice#unavailable':
unavailable:
template: '@SyliusShop/shared/form/select_payment/unavailable.html.twig'
priority: 0

'sylius_shop.shared.form.select_payment.payment.choice.details':
name:
template: '@SyliusShop/shared/form/select_payment/payment/choice/details/name.html.twig'
priority: 100
description:
template: '@SyliusShop/shared/form/select_payment/payment/choice/details/description.html.twig'
priority: 0
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ sylius_twig_hooks:
'sylius_shop.shared.grid':
filters:
template: '@SyliusShop/shared/grid/filters.html.twig'
priority: 200
data_table:
template: '@SyliusShop/shared/grid/data_table.html.twig'
priority: 100
no_results:
template: '@SyliusShop/shared/grid/no_results.html.twig'
priority: 0
Original file line number Diff line number Diff line change
Expand Up @@ -3,169 +3,225 @@ sylius_twig_hooks:
'sylius_shop.shared.order.show.summary':
addresses:
template: "@SyliusShop/shared/order/show/summary/addresses.html.twig"
priority: 300
statuses:
template: "@SyliusShop/shared/order/show/summary/statuses.html.twig"
priority: 200
table:
template: "@SyliusShop/shared/order/show/summary/table.html.twig"
priority: 100
table_summary:
template: "@SyliusShop/shared/order/show/summary/table_summary.html.twig"
template: "@SyliusShop/shared/order/show/summary/table_summary.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.addresses':
billing:
template: "@SyliusShop/shared/order/show/summary/addresses/billing.html.twig"
priority: 100
shipping:
template: "@SyliusShop/shared/order/show/summary/addresses/shipping.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.addresses.billing':
header:
template: "@SyliusShop/shared/order/show/summary/addresses/billing/header.html.twig"
priority: 100
body:
template: "@SyliusShop/shared/order/show/summary/addresses/billing/body.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.addresses.billing.body':
address:
template: "@SyliusShop/shared/address.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.addresses.shipping':
header:
template: "@SyliusShop/shared/order/show/summary/addresses/shipping/header.html.twig"
priority: 100
body:
template: "@SyliusShop/shared/order/show/summary/addresses/shipping/body.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.addresses.shipping.body':
address:
template: "@SyliusShop/shared/address.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table':
header:
template: "@SyliusShop/shared/order/show/summary/table/header.html.twig"
priority: 200
body:
template: "@SyliusShop/shared/order/show/summary/table/body.html.twig"
priority: 100
footer:
template: "@SyliusShop/shared/order/show/summary/table/footer.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table.header':
item:
template: "@SyliusShop/shared/order/show/summary/table/header/item.html.twig"
configuration:
label: 'item'
priority: 300
unit_price:
template: "@SyliusShop/shared/order/show/summary/table/header/item.html.twig"
configuration:
test_id: 'price'
label: 'unit_price'
class: 'text-end'
priority: 200
quantity:
template: "@SyliusShop/shared/order/show/summary/table/header/item.html.twig"
configuration:
label: 'qty'
class: 'text-end'
priority: 100
subtotal:
template: "@SyliusShop/shared/order/show/summary/table/header/item.html.twig"
configuration:
label: 'subtotal'
class: 'text-end'
priority: 0

'sylius_shop.shared.order.show.summary.table.body':
item:
template: "@SyliusShop/shared/order/show/summary/table/body/item.html.twig"
priority: 300
unit_price:
template: "@SyliusShop/shared/order/show/summary/table/body/unit_price.html.twig"
priority: 200
quantity:
template: "@SyliusShop/shared/order/show/summary/table/body/quantity.html.twig"
priority: 100
subtotal:
template: "@SyliusShop/shared/order/show/summary/table/body/subtotal.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary':
subtotal:
template: "@SyliusShop/shared/order/show/summary/table_summary/subtotal.html.twig"
priority: 500
taxes:
template: "@SyliusShop/shared/order/show/summary/table_summary/taxes.html.twig"
priority: 400
discount:
template: "@SyliusShop/shared/order/show/summary/table_summary/discount.html.twig"
priority: 300
shipping:
template: "@SyliusShop/shared/order/show/summary/table_summary/shipping.html.twig"
priority: 200
total:
template: "@SyliusShop/shared/order/show/summary/table_summary/total.html.twig"
priority: 100
total_in_base_currency:
template: "@SyliusShop/shared/order/show/summary/table_summary/total_in_base_currency.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary.subtotal':
label:
template: "@SyliusShop/shared/order/show/summary/table_summary/subtotal/label.html.twig"
priority: 100
value:
template: "@SyliusShop/shared/order/show/summary/table_summary/subtotal/value.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary.taxes':
label:
template: "@SyliusShop/shared/order/show/summary/table_summary/taxes/label.html.twig"
priority: 100
value:
template: "@SyliusShop/shared/order/show/summary/table_summary/taxes/value.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary.discount':
label:
template: "@SyliusShop/shared/order/show/summary/table_summary/discount/label.html.twig"
priority: 100
value:
template: "@SyliusShop/shared/order/show/summary/table_summary/discount/value.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary.shipping':
label:
template: "@SyliusShop/shared/order/show/summary/table_summary/shipping/label.html.twig"
priority: 100
value:
template: "@SyliusShop/shared/order/show/summary/table_summary/shipping/value.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary.total':
label:
template: "@SyliusShop/shared/order/show/summary/table_summary/total/label.html.twig"
priority: 100
value:
template: "@SyliusShop/shared/order/show/summary/table_summary/total/value.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.table_summary.total_in_base_currency':
label:
template: "@SyliusShop/shared/order/show/summary/table_summary/total_in_base_currency/label.html.twig"
priority: 100
value:
template: "@SyliusShop/shared/order/show/summary/table_summary/total_in_base_currency/value.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses':
payments:
template: "@SyliusShop/shared/order/show/summary/statuses/payments.html.twig"
priority: 100
shipments:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses.payments':
header:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/header.html.twig"
priority: 100
list:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/list.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses.payments.header':
title:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/header/title.html.twig"
priority: 100
state:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/header/state.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses.payments.list':
method:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/list/method.html.twig"
priority: 200
price:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/list/price.html.twig"
priority: 100
state_label:
template: "@SyliusShop/shared/order/show/summary/statuses/payments/list/state_label.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses.shipments':
header:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments/header.html.twig"
priority: 100
list:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments/list.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses.shipments.header':
title:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments/header/title.html.twig"
priority: 100
state:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments/header/state.html.twig"
priority: 0

'sylius_shop.shared.order.show.summary.statuses.shipments.list':
method:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments/list/method.html.twig"
priority: 100
state_label:
template: "@SyliusShop/shared/order/show/summary/statuses/shipments/list/state_label.html.twig"
priority: 0

0 comments on commit 429c7c8

Please sign in to comment.