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

Commit

Permalink
Pool: 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 2709676 commit 55e470d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 2 deletions.
25 changes: 24 additions & 1 deletion module/Pool/src/Pool/Controller/PoolController.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-2015 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,9 @@

class PoolController extends AbstractActionController
{
/**
* Variables
*/
protected $poolModel = null;
protected $bsock = null;
protected $acl_alert = false;
Expand All @@ -40,6 +43,11 @@ class PoolController extends AbstractActionController
"llist"
);

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

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

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

/**
* Get Pool Model
*
* @return object
*/
public function getPoolModel()
{
if(!$this->poolModel) {
Expand Down
33 changes: 32 additions & 1 deletion module/Pool/src/Pool/Model/PoolModel.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 @@ -28,6 +28,13 @@
class PoolModel
{

/**
* Get all Pools by llist command
*
* @param $bsock
*
* @return array
*/
public function getPools(&$bsock=null)
{
if(isset($bsock)) {
Expand All @@ -41,6 +48,14 @@ public function getPools(&$bsock=null)
}
}

/**
* Get all Pools by .pools command
*
* @param $bsock
* @param $type
*
* @return array
*/
public function getDotPools(&$bsock=null, $type=null)
{
if(isset($bsock)) {
Expand All @@ -59,6 +74,14 @@ public function getDotPools(&$bsock=null, $type=null)
}
}

/**
* Get a single Pool
*
* @param $bsock
* @param $pool
*
* @return array
*/
public function getPool(&$bsock=null, $pool=null)
{
if(isset($bsock, $pool)) {
Expand All @@ -72,6 +95,14 @@ public function getPool(&$bsock=null, $pool=null)
}
}

/**
* Get Pool Media by llist media command
*
* @param $bsock
* @param $pool
*
* @return array
*/
public function getPoolMedia(&$bsock=null, $pool=null)
{
if(isset($bsock, $pool)) {
Expand Down

0 comments on commit 55e470d

Please sign in to comment.