Kohana Controller class. The controller class must be extended to work properly, so this class is defined as abstract.
This is the code documentation for the SproutCMS project
Search documentation |
class ControllerKohana Controller class. The controller class must be extended to work properly, so this class is defined as abstract.
Variables
Functions
protected autoSetEmptyParamnull $Controller->autoSetEmptyParam ( array &$conf ); Auto-set the "empty" param for fields with foreign keys to be NULL This greatly reduces the number of foreign-key constraints hit in day-to-day use, especially with file fields. protected deleteRecordint $Controller->deleteRecord ( string $table , int $record_id [, int $parent_log_id ] ); Deletes a record, and logs the deletion This should be used by all _deleteSave methods Starts a transaction and commits it if not already in a transaction when called protected generateFormViewarray $Controller->generateFormView ( mixed $file_name ); Generates a form view from a JSON config file protected jsonExtraValidatevoid $Controller->jsonExtraValidate ( int $id , Validator $validator ); Do any additional validation prior to saving the record protected loadEditJsonarray $Controller->loadEditJson ( ); Loads a JSON config file for an automated edit-type form for this controller protected loadFormJsonarray $Controller->loadFormJson ( string $file_name ); Loads a config file for a JsonForm associated with this controller protected loadRecordbool|array $Controller->loadRecord ( string $table , int $record_id ); Fetches the pre-update record from the database. Used by the action log system, and disabled if the action log system has been turned off protected logActionint $Controller->logAction ( string $table , int $record_id , int $type , array $data [, int $parent_log_id ] ); Stores a history item in the database, recording an add (i.e. insert), edit, or delete. Should be called AFTER the action has been made. N.B. This is a low-level method; the friendlier wrapper methods are preferred; e.g. Controller::logAdd, Controller::logEdit protected logAddint $Controller->logAdd ( string $table , int $record_id ); Logs an add action. This is a wrapper for Controller::logAction protected logAddCategoryint $Controller->logAddCategory ( string $table , int $record_id , int $cat_id ); Logs the adding of a record to a category. This is a wrapper for Controller::logAction protected logDeleteint $Controller->logDelete ( string $table , int $record_id , array $data [, int $parent_log_id ] ); Logs a delete action. This is a wrapper for Controller::logAction protected logDeleteCategoryint $Controller->logDeleteCategory ( string $table , int $record_id , int $cat_id ); Logs the removal of a record from a category. This is a wrapper for Controller::logAction protected logEditint $Controller->logEdit ( string $table , int $record_id , array $data ); Logs an edit action. This is a wrapper for Controller::logAction protected replaceSetvoid $Controller->replaceSet ( string $table , array $new_records , array $conditions ); Inserts records which are in $new_records, but are not in the specified table Deletes records which are in the specified table, but not in $new_records Updates records which are in both Matching is done on the 'id' field, as a result the $new_records arrays MUST contain an id field. protected saveJsonDatabool $Controller->saveJsonData ( array $conf , int &$item_id [, string $mode ] ); Automatically saves the data associated with a submission on a JSON-generated form |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Friday, 5th August, 2022 at 05:25 pm |
![]() |