PHPackages                             mhujer/consistence-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. mhujer/consistence-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

mhujer/consistence-bundle
=========================

Add translator and form elements for enums from consistence/consistence

2.0.1(2y ago)124.1k1MITPHPPHP ~8.1

Since Nov 6Pushed 2y ago2 watchersCompare

[ Source](https://github.com/mhujer/consistence-bundle)[ Packagist](https://packagist.org/packages/mhujer/consistence-bundle)[ Docs](https://github.com/mhujer/consistence-bundle)[ RSS](/packages/mhujer-consistence-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (14)Versions (10)Used By (0)

ConsistenceBundle adds translator service, translator twig filter and form type for Consistence Enums
=====================================================================================================

[](#consistencebundle-adds-translator-service-translator-twig-filter-and-form-type-for-consistence-enums)

[![Build Status](https://camo.githubusercontent.com/f5d69a86025c28877d7c152e60c5d9898ac3305cbfde2434bb72a5f9732741b7/68747470733a2f2f7472617669732d63692e6f72672f6d68756a65722f636f6e73697374656e63652d62756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mhujer/consistence-bundle) [![Latest Stable Version](https://camo.githubusercontent.com/f7b0b2e63f93bf9dc2e326d1c609581ac9b80628cf217618fde811fc9ec1c90b/68747470733a2f2f706f7365722e707567782e6f72672f6d68756a65722f636f6e73697374656e63652d62756e646c652f76657273696f6e2e706e67)](https://packagist.org/packages/mhujer/consistence-bundle) [![Total Downloads](https://camo.githubusercontent.com/7a8c2ea845a091d590d49a9a5d8a3bb686aa8a5072b5913f4d8b8fdf2cf33dca/68747470733a2f2f706f7365722e707567782e6f72672f6d68756a65722f636f6e73697374656e63652d62756e646c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/mhujer/consistence-bundle) [![License](https://camo.githubusercontent.com/db762d0169cb67021a926ce8a76d4e8d6dc86cf3c49adf9ca22b19977d4fdf8e/68747470733a2f2f706f7365722e707567782e6f72672f6d68756a65722f636f6e73697374656e63652d62756e646c652f6c6963656e73652e737667)](https://packagist.org/packages/mhujer/consistence-bundle) [![Coverage Status](https://camo.githubusercontent.com/bece78c1c1e066c8e3bd1b64873e8bc75d978bf22c81a5a60850ebb374bc100e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d68756a65722f636f6e73697374656e63652d62756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/mhujer/consistence-bundle?branch=master)

This Bundle provides translator service, translator twig filter and form type for [consistence/consistence](https://github.com/consistence/consistence) enums.

Installation
============

[](#installation)

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require mhujer/consistence-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#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:

```
$ composer require mhujer/consistence-bundle
```

This command requires you to have Composer installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    // ...
    Mhujer\ConsistenceBundle\MhujerConsistenceBundle::class => ['all' => true],
];
```

Usage
=====

[](#usage)

Examples consider having the following enum:

```
