An easy way to extend/rename CakePHP helpers transparently

There were times, while developing CakePHP apps, when i felt that a certain helper wasn’t doing the right thing for me, there was something missing (for example, i felt the lack of some features on the PaginatorHelper, i’m working on an extended version of it that i’ll publish soon), and the only way to fix it would be extending the helper and replacing all it’s occurrences on my views, this can be a very time consuming task.

Fortunately, someone found a nice workaround for doing it transparently, i found plugin called Analogue, it allows you to remap helpers transparently just by adding it to the controller.

You can check it on the author’s github page

The usage is pretty straight forward, you can see it on the plugin’s readme file.

A big thank you to the plugin’s author!

(understand that the ideal solution for the problem would be forking the plugin you think could be improved, improve it, and send your changes back in a push request, in a diff, whatever.. But this helper can still be handy sometimes)

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: