miDataManagerManage which page to show
Located in /manager/DataManager.inc (line 45)
Constructor miDataManager (line 119)
Constructor
getData (line 682)
Get value for a specified field.
If value of parameter "action" from the request is 'dmEdit' it returns the value of the field taken from the database. Else it returns the value of the parameter from the request.
getDataFields (line 161)
Return array that describes the output and input of each database field
getRecord (line 132)
Return Object of class miModelSQLRecord or its subclasses which was set by setRecord method
getViewRecords (line 180)
Return Object of class miViewRecords or its subclasses which was set by setViewRecord method
process (line 245)
Determines which page will be shown or which operation will proceed, depending on the value of the "action" parameter from the request.
Example:
1 <?php
2 $dataManager = new miDataManager;
3 .
4 . //initialization of object $dataManager
5 .
6 if (!$dataManager->process())
7 echo 'Invalid parameter';
8 ?>
redirectToList (line 310)
Redirects the browser to the list of items.
Used after dmExecCreate, dmExecEdit and dmExecDelete to prevent refreshing the page to cause repetition of the operation
setDataFields (line 170)
Sets array that describes the output and input of each database field
setMainPageElements (line 221)
Sets main page elements
setRecord (line 152)
Sets object of class miModelSQLRecord or its subclasses.
miModelSQLRecord object is needed to handle and manage the inserting, updating, deleting and reading of data into the database table specified by the "tableName" in miModelSQLRecord constructor. The database table primary key is also needed in miModelSQLRecord constructor. Example:
1 <?php
2 $dataManager = new miDataManager;
3 $miDataManager->setRecord(new miModelSQLRecord('tableName', 'tablePrimaryKey'));
4 ?>
setRecordsPerPage (line 211)
Sets how many rows to show in each page when data is shown in table format
setViewRecords (line 202)
Sets Object of class miViewRecords or its subclasses.
miViewRecords object is needed to manage the representation in table format of data, which is readed from miModelSQLRecordset object set in miViewRecords constructor. The data is readed from table specified by the "tableName" in the miModelSQLRecordset constructor. Example:
1 <?php
2 $dataManager = new miDataManager;
3 $recordset = new miModelSQLRecordset('tableName');
4 $miDataManager->setViewRecords(new miViewRecords($recordset));
5 ?>
Documentation generated on Mon, 18 Oct 2004 14:58:31 +0300 by phpDocumentor 1.2.3