protected function processForm()
 {
     $formData = $this->Registry->Request->getArray();
     if (!empty($_FILES)) {
         $formData['files'] = $_FILES;
     }
     $Notification = $this->Registry->Dispatcher->post($this, 'onBeforeCategoryEdit', array('data' => $formData));
     if (!$Notification->isNotificationCancelled()) {
         try {
             $this->checkAccessPermission('edit_category');
             $canEdit = true;
         } catch (\Exception $e) {
             $canEdit = false;
         }
         /**
          * @todo when YUI 3.5.0 is released with fixed
          * upload-iframe or even better with XHR2 with upload support
          * we will either return a page with json here (in case of iframe)
          * or just add processing of uploaded file.
          */
         d('before start of Editor');
         if (Request::isAjax()) {
             d('sending out ajax');
             $Editor = new \Lampcms\Category\Editor($this->Registry);
             $aRes = $Editor->saveCategory(new \Lampcms\Category\SubmittedWWW($this->Registry->Request), $canEdit);
             $aRes = \array_diff_key($aRes, array('i_parent' => 1, 'a_subs' => 1));
             d('aRes: ' . print_r($aRes, 1));
             Responder::sendJSON(array('category' => $aRes));
         }
     } else {
         $message = '@@One of the Observers cancelled the onBeforeCategoryEdit event@@';
         d($message);
         Responder::sendJSON(array('alert' => $message));
     }
     return '@@Category data saved@@';
 }