MarcusBarnes / mik

The Move to Islandora Kit is an extensible PHP command-line tool for converting source content and metadata into packages suitable for importing into Islandora (or other digital repository and preservations systems).
GNU General Public License v3.0
34 stars 11 forks source link

Move TwigTruncate code from manipulator class to utility class #379

Closed mjordan closed 7 years ago

mjordan commented 7 years ago

The custom Twig filter TwigTruncate should be moved to a utility class so it can be shared across all Twig template implementations (other manipulators, metadataparsers, etc). The first instance where we could reuse it is in the Templated metadata parser.

We could do this by creating a utility class src/utilities/Twig, which would contain all custom Twig extensions.

MarcusBarnes commented 7 years ago

Addressed in pull-request https://github.com/MarcusBarnes/mik/pull/380 (merged with commit https://github.com/MarcusBarnes/mik/commit/2eef264e07aec75fd76dcf8658e7b59f24d2b673).