$tmpId =
$this->
Request()->
get('id'
);
$id = null;
// Collecting form data
if (!
empty($tmpId)) { $id =
(int) $tmpId;
} else { $createMode = true;
} unset($tmpId);
// Check if we are allowed to create a new db entry
if (!
$this->
_isAllowed('create'
) &&
$createMode) { $this->
View()->
assign([ 'success' => false,
'data' =>
$this->namespace->
get('no_create_rights', 'Create access denied.'
),
]);
} // Check if we are allowed to update a db entry
if (!
$this->
_isAllowed('update'
)) { $this->
View()->
assign([ 'success' => false,
'errorMsg' =>
$this->namespace->
get('no_update_rights', 'Update access denied.'
),
]);
}