library controllers use library views #639

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+4 −1
Split
View
@@ -231,6 +231,7 @@ public function set($data = array()) {
public function render(array $options = array()) {
$media = $this->_classes['media'];
$class = get_class($this);
+ $library = preg_replace('/\\\\.*/', '', $class);
$name = preg_replace('/Controller$/', '', substr($class, strrpos($class, '\\') + 1));
$key = key($options);
@@ -243,8 +244,10 @@ public function render(array $options = array()) {
'location' => false,
'data' => null,
'head' => false,
- 'controller' => Inflector::underscore($name)
+ 'controller' => Inflector::underscore($name),
+ 'library' => $library
);
+
$options += $this->_render + $defaults;
if ($key && $media::type($key)) {