(available from version 1.5 and applicable just to DataConnector/JSONDataConnector)
adds the first child tag(section) to data
$conn->add_section($name, $value);
Parameters:
See also:
enables the dynamical loading mode for connector.
$conn->dynamic_loading([$rowsNum]);
Parameters:
tree, treegrid - no parameters
grid - number of rows which should be initially loaded (the value should be more than number of rows visible in grid, or at least any positive number)
combo - maximum number of options which server will send for a single data request in autocomplete mode
See also:
enables logging for connector.
$conn->enable_log("path to log file");
Parameters:
See also:
returns current active mode.
$conn->is_select_mode();
Parameters:
Returns:
true, if select mode is active.
false, if update mode is active.
configures connector to take data from a PHP array which can be filled by any kind of external logic.
$conn->render_array($data,$id,$text,$extra,$relation_id);
Parameters:
$data - name of
PHP array.
$id - name of id field.
$text - comma separated list of data fields.
$extra - comma separated list of extra fields, optional.
$relation_id - used for building hierarchy in case of Tree and TreeGrid.
See Also:
configures connector to take data based on provided SQL text.
$conn->render_sql($sql,$id,$text,$extra,$relation_id);
Parameters:
$sql - any sql code, which will be used as a base for data selection.
$id - name of id field.
$text - comma separated list of data fields.
$extra - comma separated list of extra fields, optional.
$relation_id - used for building hierarchy in case of Tree and TreeGrid.
See Also:
configures connector to take data based on provided SQL text.
Works similar to render_sql, but have 2 differences:
Uses provided sql exactly as it is;
Can be used only for data loading (for data saving you can use separate connector, event handlers, or custom model).
The method can be used to call stored procedures in the database.
$conn->render_complex_sql($sql,$id,$text,$extra,$relation_id);
Parameters:
$sql - any sql code, which will be used as a base for data selection or the name of a stored procedure.
$id - name of id field.
$text - comma separated list of data fields.
$extra - comma separated list of extra fields, optional.
$relation_id - used for building hierarchy in case of Tree and TreeGrid.
See Also:
configures connector to take data from single table.
$conn->render_table($table,$id,$text,$extra,$relation);
Parameters:
$table - name of table.
$id - name of id field.
$text - comma separated list of data fields.
$extra - comma separated list of extra fields, optional.
$relation_id - used for building hierarchy in case of Tree and TreeGrid.
Description:
If you want to render all fields from DB ( except of identity field), you can use simplified command:
$conn->render_table($table);
See Also:
allows you to set encoding that will be applied to generated XML (default encoding is UTF-8).
$conn->set_encoding("iso-8859-1");
Parameters:
limits the number of data items that will be loaded to a component.
$conn->set_limit([$rowsNum]);
Parameters: