Flash messages "bootstrap style" are supported by a twig template that's included in the main layouts.
There are 4 types of messages: warning, info, error and success
Simply add messages to the flash bag to use:
$this->get('session')->getFlashBag()->add('message.error', 'The world was destroyed');
Some goes for message.warning, message.info and message.success
Provides a service tactics.object_route_resolver that enables you to find a matching route for a (Propel) object or class.
Create a object_routes.yml file in your app/config in which you will define the default routes of each entity.
parameters:
object_routes:
Tactics\Bundle\PersoonBundle\Model\Persoon: persoon_show
Tactics\Bundle\OrganisationBundle\Model\Plant: plant_show
Include this file in your config.yml:
imports:
- { resource: object_routes.yml }
$container->get('tactics.object_route_resolver')->retrieveByClass('Tactics\Bundle\PersoonBundle\Model\Persoon');
If you have a menu item that has a route named 'home' this item will not be shown on the homepage
Title attribute and page title can be set as global twig parameters in config.yml
twig:
globals:
title:
page_title:
The default exception-pages can be overwritten by the custom exception controller.
There are three error pages :
- 404 Page not found
- 403 Access denied
- All other errors
Add to the config (of a certain environment or all)
twig: exception_controller: "TacticsAdminBundle:Exception:exception"