$this->
View()->
assign(['success' => true, 'data' =>
$nodes]);
} /**
* Creates new mail
*/
public function createMailAction() { $params =
$this->
Request()->
getParams();
$mail =
new Mail();
$params['dirty'
] = 1;
$mail->
fromArray($params);
try { $this->
get('models'
)->
persist($mail);
$this->
get('models'
)->
flush();
} catch (Exception
$e) { $this->
View()->
assign(['success' => false, 'message' =>
$e->
getMessage()]);
return;
}