mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
(mvc) unused, pull part of https://github.com/opnsense/core/pull/1134
This commit is contained in:
parent
f67ef5e787
commit
e55feb1eb5
@ -106,22 +106,6 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase
|
||||
return $this->modelHandle;
|
||||
}
|
||||
|
||||
/**
|
||||
* validate and save model after update or insertion.
|
||||
* Use the reference node and tag to rename validation output for a specific node to a new offset, which makes
|
||||
* it easier to reference specific uuids without having to use them in the frontend descriptions.
|
||||
* @param $node reference node, to use as relative offset
|
||||
* @return array result / validation output
|
||||
*/
|
||||
protected function validateAndSave($node = null)
|
||||
{
|
||||
$result = $this->validate();
|
||||
if (empty($result['result'])) {
|
||||
return $this->save();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* validate this model
|
||||
* @param $node reference node, to use as relative offset
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user