ezsystems/ezpublish-kernel — pull request #1052 by emodric (2014-10-23 20:40:47+00:00)
Title: Add support for overriding ez_page controller with block override rules

If you need JIRA issue, will create it tomorrow first thing.

Sometimes, we require a special controller action to be able to fully implement some blocks.

Considering that you can have many places where you can call subrequests to render your blocks, current situation of requiring custom controllers to be defined directly in subrequest call is quite inefficient.

This pull request adds the possiblity to specify which controller will be called for a specific block view match, much like defining custom controllers for location view or content view match.

Also, since there are two possible actions with which one can view a block: `ez_page:viewBlock` and `ez_page:viewBlockById`, this pull request also makes it possible to specify a controller action with a signature matching either one of original actions.

Example of configuration in `ezpublish/config/ezpublish.yml`:

```yml
ezpublish:
system:
eng_frontend_group:
block_view:
ContentGrid:
template: NetgenSiteBundle:block:content_grid.html.twig
controller: NetgenSiteBundle:Block:viewContentGridBlock
match:
Type: ContentGrid
```