Commit 58bfcf6e authored by pv2b's avatar pv2b Committed by Per von Zweigbergk

style fix

parent fbe7cd29
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
*/ */
namespace OPNsense\Base; namespace OPNsense\Base;
/** /**
* Class ApiMutableTableModelControllerBase, inherit this class to implement * Class ApiMutableTableModelControllerBase, inherit this class to implement
* an API that exposes a model for tables. * an API that exposes a model for tables.
...@@ -54,7 +53,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase ...@@ -54,7 +53,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $uuid item unique id * @param $uuid item unique id
* @return array * @return array
*/ */
public function getItemAction($uuid = null) { public function getItemAction($uuid = null)
{
$mdl = $this->getModel(); $mdl = $this->getModel();
if ($uuid != null) { if ($uuid != null) {
$node = $this->getNodeByUUID($uuid); $node = $this->getNodeByUUID($uuid);
...@@ -75,7 +75,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase ...@@ -75,7 +75,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $uuid item unique id * @param $uuid item unique id
* @return array * @return array
*/ */
public function setItemAction($uuid) { public function setItemAction($uuid)
{
if ($this->request->isPost() && $this->request->hasPost(static::$internalModelName)) { if ($this->request->isPost() && $this->request->hasPost(static::$internalModelName)) {
$mdl = $this->getModel(); $mdl = $this->getModel();
if ($uuid != null) { if ($uuid != null) {
...@@ -93,7 +94,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase ...@@ -93,7 +94,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* add new item and set with attributes from post * add new item and set with attributes from post
* @return array * @return array
*/ */
public function addItemAction() { public function addItemAction()
{
$result = array("result"=>"failed"); $result = array("result"=>"failed");
if ($this->request->isPost() && $this->request->hasPost(static::$internalModelName))) { if ($this->request->isPost() && $this->request->hasPost(static::$internalModelName))) {
$mdl = $this->getModel(); $mdl = $this->getModel();
...@@ -112,7 +114,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase ...@@ -112,7 +114,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $uuid item unique id * @param $uuid item unique id
* @return array status * @return array status
*/ */
public function delItemAction($uuid) { public function delItemAction($uuid)
{
$result = array("result"=>"failed"); $result = array("result"=>"failed");
if ($this->request->isPost()) { if ($this->request->isPost()) {
$mdl = $this->getModel(); $mdl = $this->getModel();
...@@ -136,7 +139,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase ...@@ -136,7 +139,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $enabled desired state enabled(1)/disabled(1), leave empty for toggle * @param $enabled desired state enabled(1)/disabled(1), leave empty for toggle
* @return array status * @return array status
*/ */
public function toggleItemAction($uuid, $enabled = null) { public function toggleItemAction($uuid, $enabled = null)
{
$result = array("result" => "failed"); $result = array("result" => "failed");
if ($this->request->isPost()) { if ($this->request->isPost()) {
$mdl = $this->getModel(); $mdl = $this->getModel();
...@@ -164,7 +168,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase ...@@ -164,7 +168,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* search items * search items
* @return array * @return array
*/ */
public function searchItemsAction() { public function searchItemsAction()
{
$this->sessionClose(); $this->sessionClose();
$mdl = $this->getModel(); $mdl = $this->getModel();
$grid = new UIModelGrid($this->getNodes()); $grid = new UIModelGrid($this->getNodes());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment