2017 © Pedro Peláez
 

library twig-inflection-bundle

Symfony 2 Bundle for davedevelopment/twig-inflection

image

emanueleminotto/twig-inflection-bundle

Symfony 2 Bundle for davedevelopment/twig-inflection

  • Tuesday, December 8, 2015
  • by EmanueleMinotto
  • Repository
  • 1 Watchers
  • 3 Stars
  • 276 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Twig Inflection Bundle

Build Status SensioLabs Insight Coverage Status Scrutinizer Code Quality, (*1)

Symfony 2 Bundle for davedevelopment/twig-inflection., (*2)

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*3)

$ composer require emanueleminotto/twig-inflection-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*4)

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:, (*5)

// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new EmanueleMinotto\TwigInflectionBundle\TwigInflectionBundle(),
        );
    }
}

Usage

pluralize, (*6)

{{ "chicken"|pluralize }}

=> chickens

{{ rows.length }} {{ "row"|pluralize(rows.length) }}

=> 1 row
=> 2 rows

{{ users.length }} {{ "person"|pluralize(users.length, "users") }}

=> 1 person
=> 2 users

singularize, (*7)

The opposite of pluralize, working in the same manner, (*8)

{{ "chickens"|singularize }}

=> chicken

License

This bundle is under the MIT license. See the complete license in the bundle:, (*9)

Resources/meta/LICENSE

The Versions

08/12 2015

dev-master

9999999-dev

Symfony 2 Bundle for davedevelopment/twig-inflection

  Sources   Download

MIT

The Requires

 

The Development Requires

23/08 2015

0.1.0

0.1.0.0

Symfony 2 Bundle for davedevelopment/twig-inflection

  Sources   Download

MIT

The Requires

 

The Development Requires