Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Schedule: Controller and Model Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergkemper committed May 24, 2017
1 parent fc0e72a commit b45b2e7
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
33 changes: 33 additions & 0 deletions module/Schedule/src/Schedule/Controller/ScheduleController.php
Expand Up @@ -32,6 +32,9 @@
class ScheduleController extends AbstractActionController
{

/**
* Variables
*/
protected $scheduleModel = null;
protected $bsock = null;
protected $acl_alert = false;
Expand All @@ -44,6 +47,11 @@ class ScheduleController extends AbstractActionController
"disable"
);

/**
* Index Action
*
* @return object
*/
public function indexAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand Down Expand Up @@ -124,6 +132,11 @@ public function indexAction()
}
}

/**
* Overview Action
*
* @return object
*/
public function overviewAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand Down Expand Up @@ -160,6 +173,11 @@ public function overviewAction()
);
}

/**
* Status Action
*
* @return object
*/
public function statusAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand Down Expand Up @@ -196,6 +214,11 @@ public function statusAction()
);
}

/**
* Details Action
*
* @return object
*/
public function detailsAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand Down Expand Up @@ -234,6 +257,11 @@ public function detailsAction()
);
}

/**
* Get Data Action
*
* @return object
*/
public function getDataAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand Down Expand Up @@ -278,6 +306,11 @@ public function getDataAction()
return $response;
}

/**
* Get Schedule Model
*
* @return object
*/
public function getScheduleModel()
{
if(!$this->scheduleModel) {
Expand Down
47 changes: 46 additions & 1 deletion module/Schedule/src/Schedule/Model/ScheduleModel.php
Expand Up @@ -5,7 +5,7 @@
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos-webui for the canonical source repository
* @copyright Copyright (c) 2013-2016 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @copyright Copyright (c) 2013-2017 Bareos GmbH & Co. KG (http://www.bareos.org/)
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
Expand All @@ -31,6 +31,13 @@
class ScheduleModel
{

/**
* Get Schedules
*
* @param $bsock
*
* @return array
*/
public function getSchedules(&$bsock=null)
{
if(isset($bsock)) {
Expand All @@ -44,6 +51,13 @@ public function getSchedules(&$bsock=null)
}
}

/**
* Show Schedules
*
* @param $bsock
*
* @return string
*/
public function showSchedules(&$bsock=null)
{
if(isset($bsock)) {
Expand All @@ -56,6 +70,13 @@ public function showSchedules(&$bsock=null)
}
}

/**
* Get Full Schedule Status
*
* @param $bsock
*
* @return string
*/
public function getFullScheduleStatus(&$bsock=null)
{
if(isset($bsock)) {
Expand All @@ -68,6 +89,14 @@ public function getFullScheduleStatus(&$bsock=null)
}
}

/**
* Get Schedule Status
*
* @param $bsock
* @param $name
*
* @return string
*/
public function getScheduleStatus(&$bsock=null, $name=null)
{
if(isset($bsock, $name)) {
Expand All @@ -80,6 +109,14 @@ public function getScheduleStatus(&$bsock=null, $name=null)
}
}

/**
* Enable Schedule
*
* @param $bsock
* @param $name
*
* @return string
*/
public function enableSchedule(&$bsock=null, $name=null)
{
if(isset($bsock, $name)) {
Expand All @@ -92,6 +129,14 @@ public function enableSchedule(&$bsock=null, $name=null)
}
}

/**
* Disable Schedule
*
* @param $bsock
* @param $name
*
* @return string
*/
public function disableSchedule(&$bsock=null, $name=null)
{
if(isset($bsock, $name)) {
Expand Down

0 comments on commit b45b2e7

Please sign in to comment.