Hi, can anyone explain that problem:
private function handleApiCall($dispatcher)
{
$xyz = $this->view->getParamsToView();
$this->view->disableLevel(array(
View::LEVEL_ACTION_VIEW => true,
View::LEVEL_LAYOUT => true,
View::LEVEL_MAIN_LAYOUT => true,
View::LEVEL_AFTER_TEMPLATE => true,
View::LEVEL_BEFORE_TEMPLATE => true
));
unset($xyz['_user']);
unset($xyz['lang']);
unset($xyz['_filter']);
var_dump($xyz);
die;
$this->response->setJsonContent($xyz);
}
result with that:
array (size=2) 'boolean' => boolean true 'error' => array (size=2) 0 => string 'a' (length=1) 1 => string 'b' (length=1)
but when I remove die; statement I'm getting:
array (size=0) empty []
so some magic happend and $xyz variable with array was cleared :/