Follow the deprecation note in the doc block of View class

"`$title_for_layout` is deprecated and will be removed in CakePHP 3.0"

Switch to fetch('title')

This would be the quick way. And then drop the old "title_for_layout" in 3.0 alltogether.
We could also make it a complete rewrite now.