Skip to content

Instantly share code, notes, and snippets.

@anzenehansen
Created January 22, 2014 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anzenehansen/eb26e30a8c1f8169bc66 to your computer and use it in GitHub Desktop.
Save anzenehansen/eb26e30a8c1f8169bc66 to your computer and use it in GitHub Desktop.
<?php
class AdminMain extends DatabaseManagerController {
public function index(){
}
}
?>
/** According o docs.blesta.com/display/dev/Plugin+Actions this should automatically render the proper view without setting it
<?php
class DatabaseManagerController extends AppController {
public function preAction(){
parent::preAction();
// Require login
// $this->requireLogin();
$this->uses(array("Backup"));
$this->view->view = "default";
$this->orig_structure_view = $this->structure->view;
$this->structure->view = "default";
}
}
?>
<?php
class DatabaseManagerPlugin extends Plugin {
// Provide a widget on staff's view of a client
public function getActions() {
return array(
array(
"action" => "widget_staff_client",
"uri" => "plugin/database_manager/admin_main/index/",
"name" => "Database Management",
"options" => null
)
);
}
public function __construct(){
$this->loadConfig(dirname(__FILE__) . DS . "config.json");
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment