2017 © Pedro Peláez
 

library twig-linewrap

TWIG filter to wrap lines exceeding the specified length.

image

techwilk/twig-linewrap

TWIG filter to wrap lines exceeding the specified length.

  • Thursday, July 6, 2017
  • by TechWilk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,323 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

Line Wrap (filter for TWIG)

Total Downloads Latest Stable Version License, (*1)

TWIG filter to wrap lines over a specified length with a newline, or optionally pass in a different separator., (*2)

Designed for wrapping iCal files to 75 chars max length, although should be useful in any application requiring line wrapping., (*3)

Installation

  1. Install through composer.
composer require techwilk/twig-linewrap
  1. Then add as an extension to TWIG:

``` php $twig->addExtension(new \TechWilk\Twig\Extension\LineWrap());, (*4)


## Use Use as a standard twig filter, passing in a maximum length after which to wrap: ``` twig {{ 'this is some text that goes on forever' | linewrap(10) }}

outputs:, (*5)

this is so
me text th
at goes on
 forever

Optionally pass in a different separator (such as for iCal wrapping):, (*6)

twig {{ 'this is some text that goes on forever' | linewrap(75, "\n ") }}, (*7)

The Versions

06/07 2017

dev-master

9999999-dev https://github.com/TechWilk/twig-linewrap

TWIG filter to wrap lines exceeding the specified length.

  Sources   Download

MIT

The Requires

 

by Christopher Wilkinson

twig extension filter ical linewrap

06/07 2017

v1.0

1.0.0.0 https://github.com/TechWilk/twig-linewrap

TWIG filter to wrap lines exceeding the specified length.

  Sources   Download

MIT

The Requires

 

by Christopher Wilkinson

twig extension filter ical linewrap