Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iqual-ch/symfony-extra-bundle
https://github.com/iqual-ch/symfony-extra-bundle
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/iqual-ch/symfony-extra-bundle
- Owner: iqual-ch
- Created: 2017-12-08T09:58:42.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-01T11:45:12.000Z (6 months ago)
- Last Synced: 2024-08-18T11:59:00.716Z (5 months ago)
- Language: PHP
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SymfonyExtraBundle
Provides common additions to Symfony.# Installation
```bash
composer require mpom/symfony-extra-bundle
```Add to your AppKernel.php:
```php
public function registerBundles()
{
$bundles = array(
// ...
new SymfonyExtraBundle\SymfonyExtraBundle,
// ...
)
}
```# Configuration
In your parameters.yml file add 2 new options:
```yml
locale: en # default locale
locales: [en, de, it, fr] # all supported locales
```# What's inside?
### Locale autodetector
Detects user's locale using different strategies (in this order):
* Query
* Cookie
* Accept HeaderProvides LocaleManger service (@se_locale_manager)
### Twig
#### Pagination function
Provides pagination function for rendering paginations ;D```twig
{{ pagination(totalItems, itemsPerPage, route, currentPage = 1, template ='SymfonyExtraBundle::pagination.html.twig') }}
```
#### Money filter
Formats string as money appending currency symbol (locale-based).
```twig
{{ value|money }} # CHF 1'200.00
```### SwiftMailer
####Transports:#####Mandrill
Requires installation of "hipaway-travel/mandrill-bundle"#####File
Requires parameter "mailer_local_dir" to be set.####Plugins:
#####CssToInline
Extracts styles external css file into inline styles for every html message, requires "tijsverkoyen/css-to-inline-styles".
Set option "email_css_file" of section "symfony_extra" of "config.yml" to valid *.less file.