/** * remove the tab portal state when tab is removed * @author radu */ public function executeRemovePortalState() { $config = $this->hasRequestParameter('config') ? $this->getRequestParameter('config') : false; if ($config) { $config = json_decode($config); $content = get_object_vars($config->content); unset($config->content); $config->content[$config->layoutItem] = $content; unset($content); $afPortalStateObj = afPortalStatePeer::removeState($config); /*$result=array('message'=>'Portal state was saved successfuly!');*/ $result = array(); } else { $result = array('message' => 'There was an error while sending the data!'); } $result = json_encode($result); return $this->renderText($result); }