? Twig extension for Case Converter
This package is a Twig extension that provides the following filters:
-
`to_ada`
-
`to_camel`
-
`to_cobol`
-
`to_dot`
-
`to_kebab`
-
`to_lower`
-
`to_macro`
-
`to_pascal`
-
`to_sentence`
-
`to_snake`
-
`to_title`
-
`to_train`
-
`to_upper`

Usage
{{ 'welcome-to-the-jungle'|to_camel }}
{# outputs 'welcomeToTheJungle' #}
How to install
Install with Composer:
$ composer require jawira/case-converter-twig
If you are not using Symfony Flex, you also have to register the extension:
# config/packages/case_converter_twig.yaml
services:
jawira.case.converter.twig:
class: \Jawira\CaseConverterTwig\CaseConverterExtension
tags: ['twig.extension']
Documentation
<https://jawira.github.io/case-converter/>
Contributing
If you liked this project, ? star it on GitHub.
License
This library is licensed under the MIT license.
*
Packages from jawira
<dl>
<dt>
<a href="https://packagist.org/packages/jawira/case-converter">jawira/case-converter
<img alt="GitHub stars" src="https://badgen.net/github/stars/jawira/case-converter?icon=github"/></a>
</dt>
<dd>Convert strings between 13 naming conventions: Snake case, Camel case,
Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case,
Upper case, Lower case, Sentence case, Title case and Dot notation.
</dd>
<dt>
<a href="https://packagist.org/packages/jawira/emoji-catalog">jawira/emoji-catalog
<img alt="GitHub stars" src="https://badgen.net/github/stars/jawira/emoji-catalog?icon=github"/></a>
</dt>
<dd>Get access to +3000 emojis as class constants.</dd>
<dt><a href="https://packagist.org/packages/jawira/">more...</a></dt>
</dl>