'success' => true,
'data' =>
$data,
]);
} /**
* Event listener method of the user manager backend module, which is fired
* when the user wants to create a new resource.
*/
public function savePrivilegeAction() { $privilege =
new Privilege();
$data =
$this->
Request()->
getParams();
$privilege->
fromArray($data);
$this->modelManager->
persist($privilege);
$this->modelManager->
flush();
$data =
$this->modelManager->
toArray($privilege);
$this->
View()->
assign([ 'success' => true,
'data' =>
$data,
]);