Skip to content

Commit

Permalink
PSR-2 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mediabeastnz committed Jan 26, 2016
1 parent 9c66dfd commit e1bd322
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions code/DevTasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
* @package DevTasks
*
*/
class DevTasks extends LeftAndMainExtension implements PermissionProvider {
public function init() {
class DevTasks extends LeftAndMainExtension implements PermissionProvider
{

public function init()
{
parent::init();
if(!Permission::check("VIEW_DEVTASKS")) return;

if (!Permission::check("VIEW_DEVTASKS")) return;

$tasks = array(
'devbuild' => array(
Expand All @@ -20,6 +24,7 @@ public function init() {
);

$config_tasks = Config::inst()->get(__CLASS__, 'tasks');

if (is_array($config_tasks)) {
$tasks = array_merge($tasks, $config_tasks);
}
Expand All @@ -36,13 +41,19 @@ public function init() {
// priority controls the ordering of the link in the stack. The
// lower the number, the lower in the list
$priority = -90;

CMSMenu::add_link($item, '', '#', $priority, $attributes);

}
}

public function providePermissions() {
public function providePermissions()
{
return array(
"VIEW_DEVTASKS" => "Access dev task menu",
);
}

}

?>

0 comments on commit e1bd322

Please sign in to comment.