The recommended approach is to use the CakePHP plugin CakePdf for this. With that plugin it is "a piece of cake" to output HTML views as PDF or render them to files for download/emailing etc. You can obviously just use…
Author: Mark
Using Composer
There are quite a few good articles on this topic, already. Especially on how to leverage it for CakePHP projects. See using-composer-with-cakephp-2-dot-x or maybe installing-cakephp-with-composer So I won’t go into detail too much. It is worth noting that composer really…
Continuous Integration with Jenkins
CI with Jenkins and GitHub is especially interesting for private repositories, as CI with Travis is mainly for free GitHub repos (unless you have Travis Pro, of course). But since Jenkins is OpenSource and free, it might make sense to…
CakePHP and NamedScope for DRY conditions
A behavior for CakePHP 2.x Background I stumbled upon this fork and SimpleScope. The latter has the disadvantage of redundancy in the scope conditions when used in multiple find configs. The first was pretty much how Rails’ scopes work. But…
AJAX and CakePHP
I don’t know why I didn’t post about AJAX earlier. It is probably one of the topics that most don’t really know how to approach. The docs don’t say much about it, and so many try to rely on (outdated)…
Queue – Deferred execution in CakePHP
At the beginning of 2.x I ported the Queue plugin from 1.x to 2.0 and started to integrate it into a few apps of mine. Since then it was running OK, but neither with fixed tests, nor with any real…
ResetBehavior and HazardableBehavior
ResetBehavior Reset is a new behavior I recently had to write to update some geocoded entries as well as records with processed titles/slugs – via beforeSave() – that had to be re-saved with a corrected processing method. Basically, it is…
RSS feeds in CakePHP
Recently I noticed that Thunderbird doesn’t import and update RSS feeds anymore that are (partially) invalid. Well, mine always were I guess. Back in the days (4 years ago) I wasn’t aware that the author tag was only for email…
Moving a CakePHP app
This weekend I had to move some small to medium sized CakePHPs from one server to another. Basically, I had to switch hosting for them (web space and database). I haven’t had the time to write a lot lately. But…
CakePHP Tips – Summer 2013
While CakePHP 2.4 is now just around the corner (already beta), a few tips gathered the last few days. Don’t mix controller and component pagination Currently, if you mix controller pagination setup and call the Pagination component then, it can…