internations / type-jail-bundle
Constraint objects to super types for templating
Installs: 49 489
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 35
Forks: 0
Open Issues: 0
Requires
- php: >=7.4
- internations/type-jail: ^2 || ^3
- symfony/dependency-injection: >=4.4
- symfony/http-kernel: >=4.4
- symfony/twig-bundle: >=4.4
Requires (Dev)
- internations/kodierungsregelwerksammlung: ~0.35
- phpunit/phpunit: ~9
- roave/backward-compatibility-check: ^5 || ^6
- symfony/framework-bundle: >=4.4
- symfony/proxy-manager-bridge: >=4.4
- symfony/templating: >=4.4
- symfony/yaml: >=4.4
This package is auto-updated.
Last update: 2024-10-27 01:50:05 UTC
README
Enforce super type contract of an object in a Twig template
Installation
Install with composer require internations/type-jail-bundle:*
. Add
new InterNations\Bundle\TypeJailBundle\InterNationsTypeJailBundle()
in your AppKernel.php
to load the bundle.
Configuration
inter_nations_type_jail:
enabled: # boolean (default: reflects the kernel.debug setting)
factory: # one of jail, super_type_jail, jail (default: jail)
types: # A map of type aliases to not use full qualified namespaces in a template
fileInfo: SplFileInfo
Usage
{% set file = jail(file, 'fileInfo') %}
{% set files = jail_aggregate(files, 'fileInfo') %}