Permalink
Browse files

Merge pull request #10 from elazar/42ca4771a3ded6398c28bb5b412fbdfd58…

…4b71af

layout() shortcut missing from Breeze.php
  • Loading branch information...
2 parents b1cf9fe + 42ca477 commit b502107fcaca2c09153a20ee576fb7c953d35abe @whatthejeff committed Jun 1, 2011
Showing with 20 additions and 1 deletion.
  1. +20 −1 lib/Breeze.php
View
@@ -540,6 +540,25 @@ function template()
);
}
+/**
+ * Sets the layout to use.
+ *
+ * @code
+ * // Path resolves to views/path/to/layout.php
+ * layout('path/to/layout');
+ * @endcode
+ *
+ * @param string $path The path to the layout file
+ *
+ * @return void
+ */
+function layout()
+{
+ return call_user_func_array(
+ array(Application::getInstance('breeze'), 'layout'), func_get_args()
+ );
+}
+
// Moves all user-defined helpers to the global scope
foreach (Application::getInstance('breeze')->getUserHelpers() as $helper) {
eval(
@@ -551,4 +570,4 @@ function template()
);
}"
);
-}
+}

0 comments on commit b502107

Please sign in to comment.