2017 © Pedro Peláez
 

symfony-bundle slugify-bundle

Provides a slugify service and twig filter for Symfony2.

image

zenstruck/slugify-bundle

Provides a slugify service and twig filter for Symfony2.

  • Thursday, December 4, 2014
  • by kbond
  • Repository
  • 0 Watchers
  • 0 Stars
  • 38,932 Installations
  • 3 Dependents
  • 3 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 1 % Grown

The README.md

ZenstruckSlugifyBundle

DEPRECATED in favor of cocur/slugify which now includes a Symfony2 Bundle, (*1)

This bundle provides integration of the Slugify library into Symfony2. A slugify service and twig filter is provided., (*2)

Installation

  1. Install with composer:, (*3)

    php composer.phar require zenstruck/slugify-bundle
    
  2. Enable the bundle:, (*4)

    // app/AppKernel.php
    
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Zenstruck\SlugifyBundle\ZenstruckSlugifyBundle()
        );
    }
    

Using the service

/** @var Cocur\Slugify\Slugify $slugify */
$slugify = $this->container->get('zenstruck.slugify');

Using the Twig filter

```html+jinja {{ 'Hello World!'|slugify }} {# hello-world #}, (*5)

{# custom space separator #} {{ 'Hello World!'|slugify('_') }} {# hello_world #}, (*6)

{# custom space separator and custom replacement for emptyValue #} {{ '####'|slugify('_', 'non') }} {# non #}, (*7)


## Full Default Configuration ```yaml zenstruck_slugify: twig: true #enable twig filter mode: array #iconv or array mode

The Versions

04/12 2014

dev-master

9999999-dev http://zenstruck.com/project/ZenstruckSlugifyBundle

Provides a slugify service and twig filter for Symfony2.

  Sources   Download

MIT

The Requires

 

slug slugify

11/12 2013

v1.1.1

1.1.1.0 http://zenstruck.com/project/ZenstruckSlugifyBundle

Provides a slugify service and twig filter for Symfony2.

  Sources   Download

MIT

The Requires

 

slug slugify

17/09 2013

v1.1.0

1.1.0.0 http://zenstruck.com/project/ZenstruckSlugifyBundle

Provides a slugify service and twig filter for Symfony2.

  Sources   Download

MIT

The Requires

 

slug slugify

17/04 2013

v1.0.0

1.0.0.0 http://zenstruck.com/project/ZenstruckSlugifyBundle

Provides a slugify service and twig filter for Symfony2.

  Sources   Download

MIT

The Requires

 

slug slugify