Permalink
Browse files

Presenter: additional layouts

  • Loading branch information...
1 parent d041602 commit 2158cd523e52fa26d1a3f16ca86eb08648ef2c62 @kolinger committed Dec 29, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 Application/UI/Presenter.php
View
26 Application/UI/Presenter.php
@@ -33,6 +33,11 @@ class Presenter extends \Nette\Application\UI\Presenter
*/
private $serviceLocator;
+ /**
+ * @var array
+ */
+ private $layouts = array();
+
/**
@@ -144,4 +149,25 @@ public function &__get($name)
return $this->autowire[$name]['value'];
}
+
+
+ /**
+ * @param string $layout
+ */
+ public function addLayout($layout)
+ {
+ $this->layouts[] = $layout;
+ }
+
+
+
+ /**
+ * @return array
+ */
+ public function formatLayoutTemplateFiles()
+ {
+ $list = parent::formatLayoutTemplateFiles();
+ return array_merge($list, $this->layouts);
+ }
+
}

0 comments on commit 2158cd5

Please sign in to comment.