UnionOfRAD/lithium — pull request #884 by pixelcog (2013-04-12 12:06:45+00:00)
Title: Allow for inheritance of Controller::$_render property within subclasses

I'd like the be able to do the following in a few controllers of mine which utilize an alternative layout:

class DashboardController extends \lithium\action\Controller {

/**
* Specify dashboard layout by default
*
*/
protected $_render = array('layout' => 'dashboard');

[...]
}

However, when doing this, all of the other default attributes of the `$_render` property become undefined unless I lift the entire array from the `\lithium\action\Controller` class.

So I'm left with doing this instead:

class DashboardController extends \lithium\action\Controller {

/**
* Specify dashboard layout by default
*
*/
public function __construct(array $config = array()) {
$defaults = array('render' => array('layout' => 'dashboard'));
parent::__construct($config + $defaults);
}

[...]
}

This PR aims to make inheritance within the $_render property simpler by inheriting and merging defaults from all parent classes similar to how `\lithium\data\Model` handles inheritance in the $_meta property.