Download the PHP package keiwen/cacofony without Composer
On this page you can find all versions of the php package keiwen/cacofony. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download keiwen/cacofony
More information about keiwen/cacofony
Files in keiwen/cacofony
Package cacofony
Short Description Custom Application Code Overlay for symfony
License
Informations about the package cacofony
Cacofony
Custom Application Code Overlay for Symfony framework
Consolidation completed for Symfony 6.4
Controller
- Parent controller 'AppController' is provided
- AppController can automatically dump template parameters on dev: when modifying template, you can see every available parameters
- AppController can automatically retrieve template
(in "{controllerName}/{functionName}.html.twig") by using
return renderTemplate([])
- AppController can redirect with cookies already defined. Methods are added to redirect to referer or to self route.
Controller use a specific Request object (extending standard one), and should be declared in public/index file:
Declare its use in kernel if needed
Restrict to Role
This attribute could be used to check user role. Could be on a single action or for a whole controller.
In this example, system will check if user has 'ROLEADMIN' role. If not, an AccessDeniedException is raised. Value in attribute don't need to be uppercase or have the 'role' prefix.
Template Param
This attribute could be used for 'constants' given to templates. It could be defined on a single action, or for the full controller
In this example, all actions in this controller will automatically return a 'section' parameter, with value 'test'
Translation
For translations purpose, you can set a specific locale (default 'transCode') to display translations code instead of actual translated strings. Useful when working on translations from running application.
Twig
Filters
label
add ':' at the end of your text. Depending on locale, it can add non-breakable space (as in french)str_limit
to limit displayed string to given length, ending with '...' by defaultucfirst
switch first letter to uppercaseMethods
getRoute()
returns route namehasRole('user')
check if current user has specified role. Value don't need to be uppercase or have the 'role_' prefix.
EntityRegistry
Can save, remove, detach or copy an entity or a list of entities. Each methods include an optional commit parameter (default true). In controller:
All versions of cacofony with dependencies
ext-curl Version *
ext-json Version *
ext-intl Version *
symfony/framework-bundle Version ^6.4
keiwen/utils Version >=2.0