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

Commit

Permalink
Fileset: 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 3744cd6 commit bcc5d77
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
26 changes: 24 additions & 2 deletions module/Fileset/src/Fileset/Controller/FilesetController.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 @@ -32,9 +32,17 @@
class FilesetController extends AbstractActionController
{

/**
* Variables
*/
protected $filesetModel = null;
protected $bsock = null;

/**
* Index Action
*
* @return object
*/
public function indexAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand All @@ -59,6 +67,11 @@ public function indexAction()
);
}

/**
* Details Action
*
* @return object
*/
public function detailsAction()
{
$this->RequestURIPlugin()->setRequestURI();
Expand All @@ -85,6 +98,11 @@ public function detailsAction()
);
}

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

/**
* Get Fileset Model
*
* @return object
*/
public function getFilesetModel()
{
if(!$this->filesetModel) {
Expand All @@ -139,4 +162,3 @@ public function getFilesetModel()
}

}

24 changes: 23 additions & 1 deletion module/Fileset/src/Fileset/Model/FilesetModel.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 FilesetModel
{

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

/**
* Get a single Fileset
*
* @param $bsock
* @param $id
*
* @return array
*/
public function getFileset(&$bsock=null, $id)
{
if(isset($bsock, $id)) {
Expand All @@ -54,6 +69,13 @@ public function getFileset(&$bsock=null, $id)
}
}

/**
* Get all Filesets by .filesets command
*
* @param $bsock
*
* @return array
*/
public function getDotFilesets(&$bsock=null)
{
if(isset($bsock)) {
Expand Down

0 comments on commit bcc5d77

Please sign in to comment.