Permalink
Browse files

Added missing layout() shortcut to Breeze.php

  • Loading branch information...
1 parent b1cf9fe commit 42ca4771a3ded6398c28bb5b412fbdfd584b71af @elazar elazar committed May 30, 2011
Showing with 20 additions and 1 deletion.
  1. +20 −1 lib/Breeze.php
View
21 lib/Breeze.php
@@ -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 42ca477

Please sign in to comment.