Update URL Rewrite Rules in WordPress

Rewriting Basics

URL rewriting is the process of creating a URL that is friendly for users to look at, type, and share and is usually referred to as a pretty URL. URL rewriting allows you to take query parameters and add them to the URL instead of after the ? in the URL. more…




How to View Text that is Run Through the Symfony 2 Translator by Highlighting Translations

The Symfony 2 translator does a great job at translating text but there is not a great way to quickly see what text in a project is translated, especially when it could be translated by Symfony internally, in a model file, in a controller, in a twig template, etc. Given all of the different options, how could you quickly confirm text is running through the translator, and running through the translator only one time, so you don’t end up double translating text. more…



Override Symfony 2 Form Element Twig Template

It is possible to change the way a form element is rendered in a Symfony 2 project by overriding the Twig template. You can do this on a per-form basis by including the form element’s block right in your view, or you can make the change application-wide. more…


Create an Authentication Listener in Symfony 2

It is possible to subscribe to many events in Symfony 2, and login events are no different. You may want to have an authentication listener that increments a user’s failed login attempts so an account can be locked or you may want to set the last login date for a user on a successful login. more…




Change the Symfony 2 Validator Translation Domain and File Path

Change the translation path for the Symfony 2 validator

By default, the translation domain for the Symfony 2 validator is ‘validators’ and the translations are stored in the resources/translations/validators.<locale>.xliff files. In some applications it might be nice to use the same translation file as the rest of the site translations for validation messages, rather than using a separate validation translation file. Symfony makes this easy by setting a single parameter.

more…