Commit 5d6258a7 authored by Jason Lewis's avatar Jason Lewis

Can now check for existance of named views.

Signed-off-by: 's avatarJason Lewis <jason.lewis1991@gmail.com>
parent b27b1321
...@@ -118,6 +118,11 @@ class View implements ArrayAccess { ...@@ -118,6 +118,11 @@ class View implements ArrayAccess {
*/ */
public static function exists($view, $return_path = false) public static function exists($view, $return_path = false)
{ {
if(starts_with($view, 'name: '))
{
$view = static::$names[substr($view, 6)];
}
list($bundle, $view) = Bundle::parse($view); list($bundle, $view) = Bundle::parse($view);
$view = str_replace('.', '/', $view); $view = str_replace('.', '/', $view);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment