/* kind of magic - move to repo */
private function doCustomActions(&$model)
{
foreach ($model->customCallbacks as $action) {
if(method_exists($this, $action)) {
call_user_func_array(array($this, $action), array(&$model));
}
}
}
/* move this to service or something */
private function setCurrentUser(&$model)
{
$model->setUser($this->getCurrentUser());
}