dzango/twig-truncate-bundle

A Symfony 2 bundle to include the TwigTruncateExtension into your app.

Installs: 6 853

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Open Issues: 0

Type:symfony-bundle

1.0.4 2016-09-01 09:19 UTC

This package is auto-updated.

Last update: 2020-02-02 11:28:18 UTC


README

A Symfony2 bundle to include the TwigTruncateExtension into your app. The TwigTruncateExtension allows you to truncate text while preserving HTML tags.

Installation

Add the bundle to your app's composer.json:

    "require": {
        "dzango/twig-truncate-bundle": "~1.0",
        ...
    }

Enable the bundle in your app's Appkernel:

# app/AppKernel.php
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
        	...
            new Dzango\Bundle\TwigTruncateBundle\TwigTruncateBundle(),
            ...
        );

Usage

See the TwigTruncateExtension's documentation.