tamtam / helpers-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
TamTam HelpersBundle for Symfony2
dev-master
2015-10-02 16:47 UTC
Requires
- php: >=5.3.2
- symfony/symfony: *
This package is auto-updated.
Last update: 2019-03-18 14:28:04 UTC
README
Helpers bundle for symfony.
Not yet ready for distribution. Need variabilisation of domain and other things before!
Functionalities:
- Router
Router:
The will here was to have the possibility of accessing the application with different urls and have a corresponding url generation. By this way, we can have a internal network and with [project_code].[user].[domain].[ext], we can reach every project of every developer without any modification. Be Careful that user should be trigram style.
Installation:
composer require tamtam/helpers-bundle
Enable Bundle:
In appKernel.php add the following line:
new TamTam\HelpersBundle\TamTamHelpersBundle(),
Configuration:
For using by explicit call
In app/config/service.yml:
services:
#Require project_code parameter to be set in config.yml
tamtam_helpers.generate_url:
class: TamTam\HelpersBundle\GenerateUrl\GenerateUrl
arguments: [@router, %project_code%]
scope: request
In app/config/config.yml:
parameters:
project_code: [your_project_code]
For using directly by the symfony router (only from v1.0.3)
In app/config/service.yml:
parameters:
router.options.generator_class: TamTam\HelpersBundle\GenerateUrl\GenerateUrl
router.options.generator_base_class: TamTam\HelpersBundle\GenerateUrl\GenerateUrl
#@todo need to find a way to pass the project code as argument. It's currently working due to subdomain but with a www. it will not (so right now the following is useless)
In app/config/config.yml:
parameters:
project_code: [your_project_code]