Somewhat complicated preview system which copies existing data into temporary tables, then renders the preview via a front-end method call
This is the code documentation for the SproutCMS project
Search documentation |
class PreviewSomewhat complicated preview system which copies existing data into temporary tables, then renders the preview via a front-end method call
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-16
**/
class NewClassName extends Preview {
/**
* Loads a preview by creating temporary tables in SQL, calling a
* controller's _editSave method, and then calling a method it would
* normally use to display its (non-temporary) data
**/
public function load (ManagedAdminController $ctlr, array $tables, int $record_id) {
// Method code goes here
}
/**
* Run a controller method using the preview data.
* This injects the word 'PREVIEW' into the page title
**/
public function run (Controller $ctlr, string $method, array $args) {
// Method code goes here
}
}
?>
|
| 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 |
|