templates/platform/component/atom/paragraph.html.twig line 1

Open in your IDE?
  1. {#
  2. Clefs disponibles
  3. - enabled
  4. - type => default p
  5. - class
  6. - content
  7. - format 'html'|null
  8. - uc_first => default true
  9. #}
  10. {% if value.alternative_content_no_point is defined and app.user %}
  11. {% set userPoint = getAvailablePointOfUser(app.user) %}
  12. {% endif %}
  13. <{% if value.type is defined and value.type not in ['', null] %}{{ value.type }}{% else %}p{% endif %} {% if value.class is defined %} class="{{ value.class }}"{% endif %}>
  14. {% if value.format is defined and value.format is same as('html') %}
  15. {{ value.content|replaceKeyInText|raw }}
  16. {% else %}
  17. {% if value.uc_first is defined and value.uc_first in [false, true] %}
  18. {% set uc_first_content = value.uc_first %}
  19. {% else %}
  20. {% set uc_first_content = true %}
  21. {% endif %}
  22. {% if value.alternative_content_no_point is defined and userPoint is defined and userPoint == 0 %}
  23. {{ value.alternative_content_no_point|replaceKeyInText|trans([], null, null, uc_first_content)|raw }}
  24. {% elseif value.content is defined %}
  25. {{ value.content|replaceKeyInText|trans([], null, null, uc_first_content)|raw }}
  26. {% endif %}
  27. {% endif %}
  28. </{% if value.type is defined %}{{ value.type }}{% else %}p{% endif %}>