Changeset 1025
- Timestamp:
- 07/19/08 00:50:50 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/controllers/jControllerDaoCrud.class.php
r989 r1025 6 6 * @contributor Bastien Jaillot 7 7 * @contributor Thibault PIRONT < nuKs > 8 * @copyright 2007 Laurent Jouanneau8 * @copyright 2007-2008 Laurent Jouanneau 9 9 * @copyright 2007 Thibault PIRONT 10 10 * @copyright 2007,2008 Bastien Jaillot … … 219 219 // errors or already filled field. see ticket #292 220 220 $form = jForms::create($this->form); 221 $this->_preCreate($form); 221 222 $rep = $this->getResponse('redirect'); 222 223 $rep->action = $this->_getAction('create'); 223 224 return $rep; 225 } 226 227 /** 228 * overload this method if you want to do additionnal during the precreate action 229 * @param jFormsBase $form the form 230 * @since 1.1 231 */ 232 protected function _preCreate($form) { 233 224 234 } 225 235 … … 245 255 246 256 /** 247 * overload this method if you wan to do additionnal things on the response and on the edit template257 * overload this method if you want to do additionnal things on the response and on the edit template 248 258 * during the create action. 249 259 * @param jFormsBase $form the form … … 254 264 255 265 } 256 266 257 267 /** 258 268 * overload this method if you wan to do additionnal things on the dao generated by the … … 260 270 * @param jFormsBase $form the form 261 271 * @param jDaoRecordBase $form_daorec 262 */ 272 * @since 1.1 273 */ 263 274 protected function _beforeSaveCreate($form, $form_daorec) { 264 275 265 276 } 266 277 267 278 /** 268 279 * save data of a form in a new record … … 305 316 } 306 317 307 308 318 /** 309 319 * prepare a form in order to edit an existing record, and redirect to the editupdate action … … 326 336 return $rep; 327 337 } 338 $this->_preUpdate($form); 328 339 329 340 $rep->action = $this->_getAction('editupdate'); 330 341 $rep->params['id'] = $id; 331 342 return $rep; 343 } 344 345 /** 346 * overload this method if you want to do additionnal things during preupdate action 347 * @param jFormsBase $form the form object 348 * @since 1.1 349 */ 350 protected function _preUpdate($form) { 351 332 352 } 333 353 … … 368 388 369 389 } 370 390 371 391 /** 372 392 * overload this method if you wan to do additionnal things on the dao generated by the … … 375 395 * @param jDaoRecordBase $form_daorec 376 396 * @param mixed $id the new id of the updated record 377 */ 397 * @since 1.1 398 */ 378 399 protected function _beforeSaveUpdate($form, $form_daorec, $id) { 379 400 … … 484 505 485 506 } 486 487 ?>
