Provides tools for dealing with the database Tools include a sync tool and a structure viewer
This is the code documentation for the SproutCMS project
Search documentation |
class DbToolsControllerProvides tools for dealing with the database Tools include a sync tool and a structure viewer
Variables
Functions
public __call (from BaseController)void $BaseController->__call ( string $method , array $args ); Handles methods that do not exist. public __constructvoid $DbToolsController->__construct ( ); Constructor public _run (from BaseController)void $BaseController->_run ( mixed $method , mixed $args ); The router/kohana will invoke this method to invoke an action. If you please, you may wrap this method to create before/after hooks. public ajaxPageIdsvoid $DbToolsController->ajaxPageIds ( int $subsite_id ); Render page drop-down for given sub-site public ajaxTableDefnvoid $DbToolsController->ajaxTableDefn ( mixed $table ); This function does not have a description public apivoid $DbToolsController->api ( string $class , string $method ); Render API test form within DB tools protected autoSetEmptyParam (from Controller)null $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. public bcryptSpeedvoid $DbToolsController->bcryptSpeed ( ); Benchmark the server to find appropriate cost parameter protected deleteRecord (from Controller)int $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 public emailvoid $DbToolsController->email ( ); Renders form to send emails public emailSendvoid $DbToolsController->emailSend ( ); Process form submission public exceptionDetailvoid $DbToolsController->exceptionDetail ( ); Browse recent exceptions - details public exceptionLogvoid $DbToolsController->exceptionLog ( ); Browse and search exceptions public exportActionvoid $DbToolsController->exportAction ( ); Does the actual export public exportFilesvoid $DbToolsController->exportFiles ( ); UI to export all files public exportFilesActionvoid $DbToolsController->exportFilesAction ( ); Action to export all files public exportTablesvoid $DbToolsController->exportTables ( ); Export tables to an SQL file public fileTypesIndexingSupportvoid $DbToolsController->fileTypesIndexingSupport ( ); Returns a list of file types which can be indexed for fulltext search protected generateFormView (from Controller)array $Controller->generateFormView ( mixed $file_name ); Generates a form view from a JSON config file public generatePasswordHashvoid $DbToolsController->generatePasswordHash ( ); Generate a password hash to store in a config file The username and hash are used by AdminAuth::processLocal public getCssClassName (from BaseController)string $BaseController->getCssClassName ( ); Return the class name for this controller, expressed in CSS style, i.e. with dashes Example: When called from BlogPostController --> 'blog-post-controller' public getModulePath (from BaseController)string $BaseController->getModulePath ( ); Gets the relative path to the module the controller lives in, or sprout itself public gettempfilevoid $DbToolsController->gettempfile ( string $source , string $tempfile [, string $orig ] ); Allows files to be downloaded from the temporary directory Only certain files from the temp directory can be downloaded. Each 'source' has a regex which is used to restrict downloads to only that particular type of file public importActionvoid $DbToolsController->importAction ( ); Action for importing tables public importFileActionvoid $DbToolsController->importFileAction ( ); Action for importing files public importFilesvoid $DbToolsController->importFiles ( ); Imports a files into the cms public importOptionsvoid $DbToolsController->importOptions ( ); This function does not have a description public importSavevoid $DbToolsController->importSave ( ); This function does not have a description public importTablesvoid $DbToolsController->importTables ( ); Import database tables from a .sql file public importXMLvoid $DbToolsController->importXML ( ); Renders form to imoprt Sprout2 Export XML public importXmlActionvoid $DbToolsController->importXmlAction ( ); Process Sprout2 Export XML into this CMS public indexvoid $DbToolsController->index ( ); Shows a list of database tools public infovoid $DbToolsController->info ( ); Output some sprout and platform info protected jsonExtraValidate (from Controller)void $Controller->jsonExtraValidate ( int $id , Validator $validator ); Do any additional validation prior to saving the record public launchChecksunknown $DbToolsController->launchChecks ( ); Run a series of self-tests to ensure everything is configured correctly public listRoutesvoid $DbToolsController->listRoutes ( ); This function does not have a description protected loadEditJson (from Controller)array $Controller->loadEditJson ( ); Loads a JSON config file for an automated edit-type form for this controller protected loadFormJson (from Controller)array $Controller->loadFormJson ( string $file_name ); Loads a config file for a JsonForm associated with this controller protected loadRecord (from Controller)bool|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 logAction (from Controller)int $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 logAdd (from Controller)int $Controller->logAdd ( string $table , int $record_id ); Logs an add action. This is a wrapper for Controller::logAction protected logAddCategory (from Controller)int $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 logDelete (from Controller)int $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 logDeleteCategory (from Controller)int $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 logEdit (from Controller)int $Controller->logEdit ( string $table , int $record_id , array $data ); Logs an edit action. This is a wrapper for Controller::logAction public moduleBuildervoid $DbToolsController->moduleBuilder ( ); Generates blank modules public moduleBuilderActionvoid $DbToolsController->moduleBuilderAction ( ); This function does not have a description public moduleBuilderDbvoid $DbToolsController->moduleBuilderDb ( ); Generates db_struct.xml content for a module public moduleBuilderExistingvoid $DbToolsController->moduleBuilderExisting ( ); Generates modules from an existing db_struct.xml file public moduleBuilderExistingActionvoid $DbToolsController->moduleBuilderExistingAction ( mixed $input_xml ); Generates modules from an existing db_struct.xml file public moduleBuilderExistingFormvoid $DbToolsController->moduleBuilderExistingForm ( mixed $input_xml ); Generates modules from an existing db_struct.xml file public moduleBuilderExistingUploadActionvoid $DbToolsController->moduleBuilderExistingUploadAction ( ); Generates modules from an existing db_struct.xml file public mtTransformunknown DbToolsController::mtTransform ( mixed $text ); Used by the module_template_action method public multimakevoid $DbToolsController->multimake ( ); Generate multiedit code private outputSqlResultsetint $DbToolsController->outputSqlResultset ( PDOStatement $results [, mixed $headings ] ); Renders SQL result set into a table public qrCodeFormvoid $DbToolsController->qrCodeForm ( ); Render form to set QR Code string public qrCodeImagevoid $DbToolsController->qrCodeImage ( ); Renders QR code image protected replaceSet (from Controller)void $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 saveJsonData (from Controller)bool $Controller->saveJsonData ( array $conf , int &$item_id [, string $mode ] ); Automatically saves the data associated with a submission on a JSON-generated form public sessionEditorvoid $DbToolsController->sessionEditor ( ); Edit the $_SESSION public sessionEditorActionvoid $DbToolsController->sessionEditorAction ( ); Session Editor Action private sessionLoopvoid $DbToolsController->sessionLoop ( mixed &$a , mixed $depth , mixed $keys ); List items in an array, along with the tools buttons private sizeToHumanstring $DbToolsController->sizeToHuman ( int $size ); Render table data size in human readable form private splitSqlunknown $DbToolsController->splitSql ( mixed $all ); Splits a set of SQL queries into individual queries public sqlvoid $DbToolsController->sql ( ); Allows the user to execute SQL queries public sqlcsvvoid $DbToolsController->sqlcsv ( ); This function does not have a description public structvoid $DbToolsController->struct ( [ mixed $arg ] ); Shows table and column definitions public syncvoid $DbToolsController->sync ( ); Syncs the db structure to match db_struct.xml private templatevoid $DbToolsController->template ( string $main_title [, mixed $html ] ); Render dbtools template public testSkinTemplatesvoid $DbToolsController->testSkinTemplates ( ); Simple tool for testing skin templates public testSkinTemplatesActionvoid $DbToolsController->testSkinTemplatesAction ( string $skin , string $tmpl ); Actual viewing UI for templates public varDumpvoid $DbToolsController->varDump ( ); Render view to see session and cookie data private xmlGetColumnsarray DbToolsController::xmlGetColumns ( DOMDocument $doc , mixed $table_name ); This function does not have a description private xmlGetTablesarray DbToolsController::xmlGetTables ( DOMDocument $doc ); This function does not have a description private xmlLoadunknown DbToolsController::xmlLoad ( mixed $module ); This function does not have a description |
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|