getValues(); switch ($data['linkType']) { case 'url': $data['pageId'] = ''; break; case 'cms': $data['url'] = ''; break; default: $data['url'] = ''; $data['pageId'] = ''; $data['linkText'] = ''; break; } $this->_getDataObj()->initFromForm($data); return $this; } protected function _setFile4Delete(&$data, $name) { if ($data[$name]) { $session = new Qs_Session_Namespace(CURRENT_PAGE); if (!is_array($session->files)) { $session->files = array(); } $session->files[$data[$name]] = $name; $data[$name] = null; } return $this; } }