Admin check

This commit is contained in:
Andy Miller
2014-10-14 12:47:47 -06:00
parent d18f0bf751
commit 9fa92b504f

View File

@@ -23,6 +23,8 @@ class Plugin implements EventSubscriberInterface
*/
protected $config;
protected $active = true;
/**
* By default assign all methods as listeners using the default priority.
*
@@ -53,6 +55,14 @@ class Plugin implements EventSubscriberInterface
$this->config = $config;
}
public function isAdmin()
{
if (isset($this->grav['admin'])) {
return true;
}
return false;
}
/**
* @param array $events
*/