original_string: public function doAdd($data, Form $form) {
          $record=$this->getRecord(null);
          $form->saveInto($record);
          $record->write();
          
          $editController=singleton('CodeBank');
          $editController->setCurrentPageID($record->ID);
          
          return $this->redirect(Controller::join_links(singleton('CodeBank')->Link('show'), $record->ID));
      }
code: public function doAdd($data, Form $form) {
          $record=$this->getRecord(null);
          $form->saveInto($record);
          $record->write();
          
          $editController=singleton('CodeBank');
          $editController->setCurrentPageID($record->ID);
          
          return $this->redirect(Controller::join_links(singleton('CodeBank')->Link('show'), $record->ID));
      }
code_tokens: public function doAdd ( $ data , Form $ form ) { $ record = $ this -> getRecord ( null ) ; $ form -> saveInto ( $ record ) ; $ record -> write ( ) ; $ editController = singleton ( 'CodeBank' ) ; $ editController -> setCurrentPageID ( $ record -> ID ) ; return $ this -> redirect ( Controller :: join_links ( singleton ( 'CodeBank' ) -> Link ( 'show' ) , $ record -> ID ) ) ; }
docstring: Handles adding the snippet to the database
  @param {array} $data Data submitted by the user
  @param {Form} $form Form submitted
docstring_tokens: Handles adding the snippet to the database