The record maintainer class.
Located in /recmaint-defs.php (line 89)
RenderableObject | --recmaintainer
Field defaults for new records
Internal array of field names being maintained
Name of the form containing maintained fields
Value, if defined, of the record to focus to on initialisation
Pointer to the key combo/select box
Prefix to differentiate one set of records from anther
Record data to maintain
If true, maintainer will be displayed with fields disabled
Define a record maintainer object.
The form name, key combo (select) box, and the list of fields it will be maintaining must be specified.
Add an array of default values for each field.
The array is a key=>value associative array, with the key = fieldname, and the value = default value for field.
Add a record of data to the maintainer.
The record is passed as an associative array, which is directory compatible with the rows returned by get_next() etc. in normal database queries. The array is therefore expected to contain the normal fieldname=>data pairs. The ordering of adding these records should be identical to the ordering of the records in the keycombo.
Cause the maintainer to be displayed initially diabled. All form fields which are part of the maintainer will be readonly/disabled.
Return the HTML for this maintainer. This consists of Javascript objects to contain the data, and hidden form fields which will be used to POST changes etc. This should be rendered inside your main form element.
Tell the record maintainer to focus the keycombo to the record with the given value, when it first initialises.
Register a button.
This assigns the proper onclick event so that the button will do the right thing when clicked. There are several types of button recognised: "up", "down", "save", "reset" and "del". NB: If the button in question already has an onclick script attached to it then this is preserved, and will be executed after the new script we attach here.
Register a form field in the maintainer.
The object passed should be a normal Axyl form object such as a form_textfield, form_checkbox or whatever. Add all of the form objects that you have in your maintenance screen.
Inherited From RenderableObject
RenderableObject::RenderableObject()
RenderableObject::html()
RenderableObject::render()
RenderableObject::wml()
RenderableObject::wmlup()
RenderableObject::xml()
Documentation generated by phpDocumentor 1.3.0RC3