Question

There is something like pre-render hook in symfony 1.4? I want to execute some code right before view render starts.

Was it helpful?

Solution

You can also set a filter before the view is rendered in the <app>/config/filters.yml file. For further details, take a look here.

OTHER TIPS

Try to use preExecute() in action class: http://www.symfony-blog.co.uk/tag/preexecute/.

Symfony allows you to configure the view class used at the module level (module.yml):

all:                  # For all environments
  view_class:         myPHP

You could then create a myPHPView class and override the sfPHPView::render method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top