This topic contains 2 replies, has 2 voices, and was last updated by cappypulpy2 5 years, 11 months ago.
- Topic
Given the following scenario, i want to override below function from OroUIBundle::macros.html.twig to remove at the whole application level the possibility to have phone actions from this specific block.
1234567891011121314151617181920{#Render phone number with related actions blockParameters:phone - PhoneInterface object or stringentity - related entity record#}{% macro renderPhoneWithActions(phone, entity) -%}{% if phone is not empty %}{%- set actions %}{%- placeholder phone_actions with {phone: phone, entity: entity} -%}{% endset -%}{% set actions = actions|trim %}<span class="inline-actions-element{% if actions is empty %} inline-actions-element_no-actions{% endif %}"><span class="inline-actions-element_wrapper">{{ _self.renderPhone(phone) }}</span>{% if actions is not empty -%}<span class="inline-actions-element_actions phone-actions">{{ actions|raw }}</span>{%- endif %}</span>{% endif %}{%- endmacro %}Now, my question is: we can override this macro separately just extending the base macros.html.twig or we need to copy the whole file with tons of macros inside new overridden macros.html.twig for just a function?
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.