Monthly Archives: July 2011

Symfony2 and Translatable example

To set up translatable have a look at my previous post: Symfony2 and DoctrineExtensions. First lets have a look at the translatable settings from the previous post // app/config/config.yml … # Doctrine Extensions Configuration stof_doctrine_extensions: default_locale: en_us translation_fallback: true orm: default: timestampable: true translatable: true The settings above tells that we want to use en_us… Read more »

Enable Twig Extentions in Symfony2

Twig extentions is included by default in the vendors but to enable one of them like the Text (to be able to use nl2br) add the following to your app/config/config.yml services: twig.extension.txt: class: Twig_Extensions_Extension_Text tags: – { name: twig.extension }

Virtual Host and Symfony2

It is always good to set up a virtual host for your project when you are developing an application. Here is an example of two virtual hosts that I have set up for two of my projects. One called crm and one called blog and both projects are located under /Users/sfprojects/ This is what I… Read more »

Symfony2 and .gitignore

*Updated 29th october 2012* Here are the settings i use for my .gitignore in a symfony project. Generic ignores: ## generic files to ignore *~ *.lock *.DS_Store *.swp *.out IDE files are personal and not interesting for other people: ## IDE files to ignore nbproject/ .idea/ *.tmproj Symfony specific ignore files: # Symfony files to… Read more »

Installing Symfony2

Here is a small video of how to install Symfony2 with git version control. My first video tutorial in years and I mumble a bit but I hope someone likes it ;). [youtube=http://www.youtube.com/watch?v=j-PJe2jDl8I&w=500&h=385] The following commands where used: To install the vendors use php bin/vendors install Clear the cache and the logs rm -rf app/cache/*… Read more »