Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
58bfcf6e
Commit
58bfcf6e
authored
Aug 08, 2016
by
pv2b
Committed by
Per von Zweigbergk
Aug 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style fix
parent
fbe7cd29
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
ApiMutableTableModelControllerBase.php
...lers/OPNsense/Base/ApiMutableTableModelControllerBase.php
+23
-18
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableTableModelControllerBase.php
View file @
58bfcf6e
...
...
@@ -29,7 +29,6 @@
*/
namespace
OPNsense\Base
;
/**
* Class ApiMutableTableModelControllerBase, inherit this class to implement
* an API that exposes a model for tables.
...
...
@@ -54,7 +53,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $uuid item unique id
* @return array
*/
public
function
getItemAction
(
$uuid
=
null
)
{
public
function
getItemAction
(
$uuid
=
null
)
{
$mdl
=
$this
->
getModel
();
if
(
$uuid
!=
null
)
{
$node
=
$this
->
getNodeByUUID
(
$uuid
);
...
...
@@ -75,7 +75,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $uuid item unique id
* @return array
*/
public
function
setItemAction
(
$uuid
)
{
public
function
setItemAction
(
$uuid
)
{
if
(
$this
->
request
->
isPost
()
&&
$this
->
request
->
hasPost
(
static
::
$internalModelName
))
{
$mdl
=
$this
->
getModel
();
if
(
$uuid
!=
null
)
{
...
...
@@ -93,7 +94,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* add new item and set with attributes from post
* @return array
*/
public
function
addItemAction
()
{
public
function
addItemAction
()
{
$result
=
array
(
"result"
=>
"failed"
);
if
(
$this
->
request
->
isPost
()
&&
$this
->
request
->
hasPost
(
static
::
$internalModelName
)))
{
$mdl
=
$this
->
getModel
();
...
...
@@ -112,7 +114,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $uuid item unique id
* @return array status
*/
public
function
delItemAction
(
$uuid
)
{
public
function
delItemAction
(
$uuid
)
{
$result
=
array
(
"result"
=>
"failed"
);
if
(
$this
->
request
->
isPost
())
{
$mdl
=
$this
->
getModel
();
...
...
@@ -136,7 +139,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* @param $enabled desired state enabled(1)/disabled(1), leave empty for toggle
* @return array status
*/
public
function
toggleItemAction
(
$uuid
,
$enabled
=
null
)
{
public
function
toggleItemAction
(
$uuid
,
$enabled
=
null
)
{
$result
=
array
(
"result"
=>
"failed"
);
if
(
$this
->
request
->
isPost
())
{
$mdl
=
$this
->
getModel
();
...
...
@@ -164,7 +168,8 @@ abstract class ApiMutableTableModelControllerBase extends ApiControllerBase
* search items
* @return array
*/
public
function
searchItemsAction
()
{
public
function
searchItemsAction
()
{
$this
->
sessionClose
();
$mdl
=
$this
->
getModel
();
$grid
=
new
UIModelGrid
(
$this
->
getNodes
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment