a base class for crud controllers
Located in /controllers/jControllerDaoCrud.class.php (line 26)
jController | --jControllerDaoCrud
selector of the dao to use for the crud.
It should be filled by child controller.
the jDb profile to use with the dao
template to display the form
selector of the form to use to edit and display a record It should be filled by child controller.
number of record to display in the list page
template to display the list of records
name of the parameter which contains the page offset, for the index action
list of properties to show in the list page if empty list (default), it shows all properties.
this property is only usefull when you use the default "list" template
list of properties which serve to order the record list.
if empty list (default), the list is in a natural order. keys are properties name, and values are "asc" or "desc".
id for the "pseudo" form used to show a record. You can change it if the default one corresponds to a possible id in your dao.
the template variable name to display a CRUD content in the main template
of the html response
full path to the directory where uploaded files will be stored automatically by jForms.
Set it to false if you want to handle yourself the uploaded files. Set it with an empty string if you want to stored files in the default var/uploads directory.
template to display a record
Inherited from jController
jController::$pluginParams
jController::$request
displays a forms to edit an existing record. The form should be
prepared with the preupdate before, so a refresh of the page won't cause a reset of the form
prepare a form in order to edit an existing record, and redirect to the editupdate action
redefine this method if you wan to do additionnal things after the creation of a record. For example, you can handle here the uploaded files. If you do such handling, set the uploadsDirectory property to false, to prevent the default behavior on uploaded files in the controller.
redefine this method if you wan to do additionnal things after the update of a record. For example, you can handle here the uploaded files. If you do such handling, set the uploadsDirectory property to false, to prevent the default behavior on uploaded files in the controller.
redefine this method if you wan to do additionnal things on the dao generated by the
jFormsBase::prepareDaoFromControls method
redefine this method if you wan to do additionnal things on the dao generated by the
jFormsBase::prepareDaoFromControls method
you can do your own data check of a form by redefining this method.
You can also do some other things. It is called only if the $form->check() is ok. and before the save of the data.
DEPRECATED, use _checkData instead
redefine this method if you want to do additionnal things on the response and on the edit template during the create action.
create the form. You can redefine this method to modify dynamically the form Typically, you call jForms::create and then you can call addControl or whatever.
Don't do a jForms::get or jForms::fill in this method ! called in methods: index, precreate, create, preupdate, view
redefine this method if you want to do additionnal things before the deletion of a record
redefine this method if you wan to do additionnal things on the response and on the edit template during the editupdate action.
returned the selector of the action corresponding of the given method of the current controller.
get an existing form. You can redefine this method to modify dynamically the form Typically, you call jForms::get and then you can call addControl or whatever.
Don't do a jForms::create or jForms::fill in this method ! called in methods: create, savecreate, editupdate, saveupdate
Returned a simple html response to display CRUD contents. You can redefine this
method to return a personnalized response
redefine this method if you wan to do additionnal things on the response and on the list template during the index action.
redefine this method if you wan to do additionnal conditions to the index's select during the index action.
redefine this method if you want to do additionnal during the precreate action
redefine this method if you want to do additionnal things during preupdate action
redefine this method if you want to do additionnal things on the response and on the view template during the view action.
Inherited From jController
jController::__construct()
jController::boolParam()
jController::floatParam()
jController::getResponse()
jController::intParam()
jController::param()
jController::params()
Documentation generated on Wed, 24 Sep 2014 21:56:57 +0200 by phpDocumentor 1.4.3