You are here

barcode--c39plus.html.twig in Barcodes 2.0.x

Same filename and directory in other branches
  1. 8 templates/barcode--c39plus.html.twig

Default theme implementation to present a barcode.

Available variables:

  • barcode: The rendered barcode format.
  • type: The barcode type.
  • format: The barcode format to display.
  • value: The barcode value.
  • width: The display width.
  • height: The display height.
  • color: The barcode color.
  • padding_top: The top padding.
  • padding_right: The right padding.
  • padding_bottom: The bottom padding.
  • padding_left: The left padding.
  • show_value: Show the raw barcode value.
  • svg: The rendered barcode in svg format.
  • png: The rendered barcode in png format.
  • htmldiv: The rendered barcode in htmldiv format.
  • unicode: The rendered barcode in unicode format.
  • binary: The rendered barcode in binary format.
  • extended_value: The barcode value + extended value if exists.

File

templates/barcode--c39plus.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to present a barcode.
  5. *
  6. * Available variables:
  7. * - barcode: The rendered barcode format.
  8. * - type: The barcode type.
  9. * - format: The barcode format to display.
  10. * - value: The barcode value.
  11. * - width: The display width.
  12. * - height: The display height.
  13. * - color: The barcode color.
  14. * - padding_top: The top padding.
  15. * - padding_right: The right padding.
  16. * - padding_bottom: The bottom padding.
  17. * - padding_left: The left padding.
  18. * - show_value: Show the raw barcode value.
  19. * - svg: The rendered barcode in svg format.
  20. * - png: The rendered barcode in png format.
  21. * - htmldiv: The rendered barcode in htmldiv format.
  22. * - unicode: The rendered barcode in unicode format.
  23. * - binary: The rendered barcode in binary format.
  24. * - extended_value: The barcode value + extended value if exists.
  25. *
  26. * @ingroup themeable
  27. */
  28. #}
  29. <div class="barcode barcode-{{ type|replace({'+': 'plus'})|lower }}">
  30. <div class="code">{{ barcode|raw }}</div>
  31. {% if show_value %}
  32. <div class="value">{{ value }}</div>
  33. {% endif %}
  34. </div>