SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class PageAdminController

Handles admin processing for pages

Variables

NameVisibilityDescription
$action_log
Should this controller log add/edit/delete actions?
$add_defaults
Default values used for adding a record.
$controller_name 
$duplicate_defaults
Default values used for duplicating a record.
$duplicate_enabled
Flag to turn duplication on or off
$export_modifiers
Modifiers applied to data prior to export
Should be a class which extends ColModifier
Can be an object instance or string of a class name
$friendly_name 
$import_columns
The columns to allow import for
$import_duplicates
The default selection for the "duplicates" option
Values are "new", "merge", "merge_blank" and "skip".
$import_headings
If a client is providing CSVs which don't have headings
You'll need to provide them in this array
$import_id_column
Typically, we don't want to import the ID, and just let autoinc do it's thing
$main_actions
Actions for the itemlist
$main_add
Should a link be shown above the list for adding records? (default yes)
$main_columns
The columns to use for the main view
$main_delete 
$main_modes
Different modes available for the main view
By default, there is only one mode: list
$main_order
Order of main view records
$main_where
An additional where clause for the main view
$navigation_name
The friendly name used in the sidebar navigation. Defaults to matching the friendly name.
$per_subsite
Should a UI for editing the "subsite_id" field on a record be shown?
If enabled by extending classes, then the table should contain a 'subsite_id' INT UNSIGNED column
$records_per_page
The default number of records to show per page
$refine_bar
Defines the widgets for the refine bar
$table_name
This is the name of the table to get data from. Will be automatically deducted from the controller name if not specified

Functions

NameVisibilityDescription
__callpublicHandles methods that do not exist.
__constructpublicConstructor
_actionLogpublic 
_addPreRenderprotectedPre-render hook for adding
_addSavepublicSaves the provided POST data into a new page in the database
_deletePostSavepublicDoes custom actions after the _deleteSave method is called, e.g. clearing cache data
_deletePreSavepublicDoes custom actions before _deleteSave method is called, e.g. extra security checks
_deleteSavepublicDeletes an item and logs the deleted data
_duplicatePreRenderprotectedHook called by _getDuplicateForm() just before the view is rendered
_duplicateSavepublicProcess the saving of a duplication. Basic version just calls _editSave
_editPreRenderprotectedPre-render hook for editing
_editSavepublicSaves the provided POST data into this page in the database
_exportDatapublicDoes the actual export. Return false on error.
_extraLinkCheckerpublicStarts the link checker
_extraLinkCheckerInfopublicTells the user the link checker is running
_extraLinkspublicShows the links (incoming and outgoing) for a page
_extraMenuGroupspublicPage organisation tool
_extraMultiDeletepublicForm to delete multiple records
_extraNeedApprovalpublicList of pages which need approval
_extraOrganisepublicPage organisation tool
_getAddFormpublicReturns the add form for adding a page
_getAddSubActionspublicReturn the sub-actions for adding; for spec AdminController::renderSubActions
_getContentspublicReturn HTML which represents a list of records for this controller
_getContentsQueryprotectedReturns the SQL query for use by the contents list.
_getContentsViewpublicReturn HTML for a resultset of items
_getContentsViewListpublicFormats a resultset of items into an Itemlist
_getCustomAddSaveHTMLpublic 
_getCustomDuplicateSaveHTMLpublicOptional custom HTML for the save box
_getCustomEditSaveHTMLpublic 
_getDeleteFormpublicReturns the edit form for editing the specified page
_getDeleteSubActionspublicReturn the sub-actions for deleting a record (e.g. cancel)
_getDuplicateFormpublicReturn HTML which represents the form for duplicating a record
_getDuplicateSubActionspublicReturn the sub-actions for duplicating a record
_getEditFormpublicReturns the edit form for editing the specified page
_getEditLiveUrlpublicReturn the URL to use for the 'view live site' button, when editing a given record
_getEditSubActionspublicReturn the sub-actions for editing a record (e.g. deleting)
_getExportpublicReturns form for doing exports
_getExportQueryprotectedReturns the SQL query for use by the export tools.
_getImportpublicReturns a form which contains options for doing an import
_getNavigationpublicReturns the contents of the navigation pane for the tree
_getRecordprotectedFetch the record with a given id
_getRefineClauseprotectedReturn the WHERE clause to use for a given key which is provided by the RefineBar
_getSearchFormpublicReturn HTML for a search form
_getToolspublicReturns the tools to show in the left navigation
_getVisibilityFieldspublicReturn the fields to show in the sidebar when adding or editing a record.
_identifierpublicCreates the identifier used in the heading, and for reordering.
_importColGuessprotectedTry to guess the database name for a given CSV heading.
_importDatapublicDoes the actual import
_importExtraOptionsprotectedCalled when the import form is being built.
_importPostprotectedCalled at the end of the the import process, after everything has been done.
_importPostRecordprotectedCalled after a record has been inserted or updated.
_importPreprotectedCalled at the beginning of the the import process.
_importPreRecordprotectedCalled after the field data has been determined, but before the insert or update is run.
_importUploadFormpublicReturn HTML for the import upload form
_intropublicReturns the intro HTML for this controller.
_invalidateCachespublicThis is called after every add, edit and delete, as well as other (i.e. bulk) actions.
_isAddSavedpublicIs the "add" action saved?
_isDeleteSavedpublicCheck if deletion of a particular record is allowed
_isEditSavedpublicIs the "edit" action saved?
_modeSelectorprotectedReturns HTML for a ui component to update the current main view mode
_paginationBarprotectedBuilds the HTML for showing the navigation through pages in the admin.
_preSaveprotected 
_runpublicThe router/kohana will invoke this method to invoke an action.
addHistoryItemprivateAdds a history item for a page
ajaxGetMenuGroupspublicReturn a list of menu groups for a selected parent page
ajaxGetRevpublicGets the text of a single revision
ajaxListWidgetTemplatespublicReturn JSON list of custom widget templates as defined by skin config
ajaxLookuppublicReturn list of records for given search term
ajaxLookupListpublicReturn list of records for given search term
applyRefineFilterprotectedApplies filters defined in the query string using a LIKE contains
autoSetEmptyParamprotectedAuto-set the "empty" param for fields with foreign keys to be NULL
checkControllerEntranceprivate (static)Validate given controller implements FrontEndEntrance
clearNavigationCachepublicForces a clear of the pagecache
convertForChangeCheckprivateMakes the provided html text be in a standard format to ensure the integrity of the change check
createPageTreenodeprivateCreate a page
cronCheckStalepublicCheck for stale page content and send emails regarding stale pages; to be run via cron
cronLinkCheckerpublicCron version of the link checker
cronPageActivatepublicActivates AutoLaunch revisions
cronPageDeactivatepublicDeactivates pages after set date
deleteRecordprotectedDeletes a record, and logs the deletion
filetreeClosepublicSaves in the session data the currently open pages in the pages tree (navigation pane)
filetreeOpenpublicReturns the children pages for a specific page, in a format required by jqueryFileTree.
fixRecordOrderprotectedIf the specified item needs a record number to be set,
generateFormViewprotectedGenerates a form view from a JSON config file
getControllerNamepublicReturns the defined controller name.
getCssClassNamepublicReturn the class name for this controller, expressed in CSS style, i.e. with dashes
getDuplicateEnabledpublicReturns the duplication enabling flag
getFriendlyNamepublicReturns the defined controller friendly name
getModulePathpublicGets the relative path to the module the controller lives in, or sprout itself
getNavigationNamepublicReturns the defined controller navigation name
getTableNamepublicReturns the defined table name
getTopnavNamepublicGets the name of the controller to use for the top nav
importNotespublicFacebox info box
importPreviewAjaxpublicPreview the pages which will be created
importUploadActionpublicUpload and do initial processing on the file
initRefineBarprotectedInitialises the refine bar if it isn't already set, with a search widget for the 'name' field if it exists
initTableNameprotectedInitialises the table name if it isn't already set, using the plural of the shorthand controller name
injectVisiblityFieldsprotectedInject the visiblity fields into a loaded json configuration, so they actually save
isPerSubsitepublicIf true, then a UI for editing the "subsite_id" for a record should be shown
jsonExtraValidateprotectedDo any additional validation prior to saving the record
linkCheckerActionpublicStarts the link checker
loadEditJsonprotectedLoads a JSON config file for an automated edit-type form for this controller
loadFormJsonprotectedLoads a config file for a JsonForm associated with this controller
loadRecordprotectedFetches the pre-update record from the database.
logActionprotectedStores a history item in the database, recording an add (i.e. insert), edit, or delete.
logAddprotectedLogs an add action. This is a wrapper for Controller::logAction
logAddCategoryprotectedLogs the adding of a record to a category. This is a wrapper for Controller::logAction
logDeleteprotectedLogs a delete action. This is a wrapper for Controller::logAction
logDeleteCategoryprotectedLogs the removal of a record from a category. This is a wrapper for Controller::logAction
logEditprotectedLogs an edit action. This is a wrapper for Controller::logAction
menuGroupsActionpublicSave the menu groups
organiseActionpublicSave tree organise form submission, see self::_extraOrganise
postJsonMultiTagpublicMulti-tag some items. Uses AJAX. Returns JSON.
postMultiDeletepublicDelete multiple records
previewpublic 
reindexAllpublicDoes a complete re-index of all pages
reindexItemprivateDoes a re-index for a page
renderPreviewTreenodeprivate (static)Render a single node for the preview tree we return in `import_preview_ajax`
reorderpublicShows the reorder screen (which is shown in a popup box) for re-ordering the children items
reorderSavepublicSaves a tree reorder
reorderToppublicShows the reorder screen (which is shown in a popup box) for re-ordering the top-level stuff
replaceSetprotectedInserts records which are in $new_records, but are not in the specified table
saveJsonDataprotectedAutomatically saves the data associated with a submission on a JSON-generated form

public __call (from BaseController)

void $BaseController->__call ( string $method , array $args );

Handles methods that do not exist.

public __construct

void $PageAdminController->__construct ( );

Constructor

public _actionLog (from ManagedAdminController)

unknown $ManagedAdminController->_actionLog ( );

This function does not have a description

protected _addPreRender (from TreeAdminController)

void $TreeAdminController->_addPreRender ( mixed $view );

Pre-render hook for adding

public _addSave

unknown $PageAdminController->_addSave ( int &$page_id );

Saves the provided POST data into a new page in the database

public _deletePostSave

void $PageAdminController->_deletePostSave ( int $item_id );

Does custom actions after the _deleteSave method is called, e.g. clearing cache data

public _deletePreSave

void $PageAdminController->_deletePreSave ( int $item_id );

Does custom actions before _deleteSave method is called, e.g. extra security checks

public _deleteSave (from TreeAdminController)

bool $TreeAdminController->_deleteSave ( int $item_id [, int $depth [, int $log_id ]] );

Deletes an item and logs the deleted data

protected _duplicatePreRender (from ManagedAdminController)

void $ManagedAdminController->_duplicatePreRender ( mixed $view , mixed $item_id );

Hook called by _getDuplicateForm() just before the view is rendered

public _duplicateSave (from ManagedAdminController)

boolean $ManagedAdminController->_duplicateSave ( int $id );

Process the saving of a duplication. Basic version just calls _editSave

protected _editPreRender (from TreeAdminController)

void $TreeAdminController->_editPreRender ( mixed $view , mixed $item_id );

Pre-render hook for editing

public _editSave

unknown $PageAdminController->_editSave ( int $page_id );

Saves the provided POST data into this page in the database

public _exportData (from ManagedAdminController)

array $ManagedAdminController->_exportData ( );

Does the actual export. Return false on error.

public _extraLinkChecker

unknown $PageAdminController->_extraLinkChecker ( );

Starts the link checker

public _extraLinkCheckerInfo

unknown $PageAdminController->_extraLinkCheckerInfo ( mixed $id );

Tells the user the link checker is running

public _extraLinks

unknown $PageAdminController->_extraLinks ( mixed $id );

Shows the links (incoming and outgoing) for a page

public _extraMenuGroups

unknown $PageAdminController->_extraMenuGroups ( );

Page organisation tool
Bulk renaming, reordering and reparenting

public _extraMultiDelete (from ManagedAdminController)

unknown $ManagedAdminController->_extraMultiDelete ( );

Form to delete multiple records

public _extraNeedApproval

unknown $PageAdminController->_extraNeedApproval ( );

List of pages which need approval

public _extraOrganise

unknown $PageAdminController->_extraOrganise ( );

Page organisation tool
Bulk renaming, reordering and reparenting

public _getAddForm

string $PageAdminController->_getAddForm ( );

Returns the add form for adding a page

public _getAddSubActions

array $PageAdminController->_getAddSubActions ( );

Return the sub-actions for adding; for spec AdminController::renderSubActions

public _getContents (from ManagedAdminController)

unknown $ManagedAdminController->_getContents ( );

Return HTML which represents a list of records for this controller

protected _getContentsQuery (from ManagedAdminController)

string $ManagedAdminController->_getContentsQuery ( string $where , string $order , array &$params );

Returns the SQL query for use by the contents list.

The query MUST NOT include a LIMIT clause.
The query MUST include a SQL_CALC_FOUND_ROWS clause.
The main table SHOULD be aliased to 'item'.

public _getContentsView (from ManagedAdminController)

unknown $ManagedAdminController->_getContentsView ( Traversable $items , string $mode , anything $unused );

Return HTML for a resultset of items
The returned HTML will be sandwiched between the refinebar and the pagination bar.

public _getContentsViewList (from ManagedAdminController)

unknown $ManagedAdminController->_getContentsViewList ( Traversable $items , anything $unused );

Formats a resultset of items into an Itemlist

public _getCustomAddSaveHTML

unknown $PageAdminController->_getCustomAddSaveHTML ( );

This function does not have a description

public _getCustomDuplicateSaveHTML (from ManagedAdminController)

unknown $ManagedAdminController->_getCustomDuplicateSaveHTML ( return $item_id );

Optional custom HTML for the save box
Return NULL to use the default HTML

public _getCustomEditSaveHTML

unknown $PageAdminController->_getCustomEditSaveHTML ( mixed $item_id );

This function does not have a description

public _getDeleteForm

string $PageAdminController->_getDeleteForm ( int $id );

Returns the edit form for editing the specified page

public _getDeleteSubActions (from ManagedAdminController)

array $ManagedAdminController->_getDeleteSubActions ( mixed $item_id );

Return the sub-actions for deleting a record (e.g. cancel)
These are rendered into HTML using AdminController::renderSubActions

public _getDuplicateForm (from ManagedAdminController)

unknown $ManagedAdminController->_getDuplicateForm ( int $id );

Return HTML which represents the form for duplicating a record

public _getDuplicateSubActions (from ManagedAdminController)

array $ManagedAdminController->_getDuplicateSubActions ( mixed $item_id );

Return the sub-actions for duplicating a record
These are rendered into HTML using AdminController::renderSubActions

public _getEditForm

string $PageAdminController->_getEditForm ( int $id );

Returns the edit form for editing the specified page

public _getEditLiveUrl

null|string $PageAdminController->_getEditLiveUrl ( int $item_id );

Return the URL to use for the 'view live site' button, when editing a given record

public _getEditSubActions (from ManagedAdminController)

array $ManagedAdminController->_getEditSubActions ( mixed $item_id );

Return the sub-actions for editing a record (e.g. deleting)
These are rendered into HTML using AdminController::renderSubActions

public _getExport (from ManagedAdminController)

unknown $ManagedAdminController->_getExport ( );

Returns form for doing exports

protected _getExportQuery (from ManagedAdminController)

unknown $ManagedAdminController->_getExportQuery ( [ string $where ] );

Returns the SQL query for use by the export tools.
The query does MUST NOT include a LIMIT clause.

public _getImport

unknown $PageAdminController->_getImport ( mixed $filename );

Returns a form which contains options for doing an import

public _getNavigation

unknown $PageAdminController->_getNavigation ( );

Returns the contents of the navigation pane for the tree

protected _getRecord (from ManagedAdminController)

array $ManagedAdminController->_getRecord ( int $id );

Fetch the record with a given id

protected _getRefineClause

string $PageAdminController->_getRefineClause ( string $key , string $val , array &$query_params );

Return the WHERE clause to use for a given key which is provided by the RefineBar

Allows custom non-table clauses to be added.
Is only called for key names which begin with an underscore.
The base table is aliased to 'item'.

public _getSearchForm (from ManagedAdminController)

unknown $ManagedAdminController->_getSearchForm ( );

Return HTML for a search form

public _getTools

unknown $PageAdminController->_getTools ( );

Returns the tools to show in the left navigation

public _getVisibilityFields (from ManagedAdminController)

array $ManagedAdminController->_getVisibilityFields ( );

Return the fields to show in the sidebar when adding or editing a record.
These fields are shown under a heading of "Visibility"

Key is the field name, value is the field label

public _identifier (from ManagedAdminController)

string $ManagedAdminController->_identifier ( array $item );

Creates the identifier used in the heading, and for reordering.

protected _importColGuess (from ManagedAdminController)

string $ManagedAdminController->_importColGuess ( string $csv_heading );

Try to guess the database name for a given CSV heading.
If you can't figure it out, return NULL.
If NULL is returned, the rudimentry almost-exact guesser will be run.

public _importData

unknown $PageAdminController->_importData ( string $filename );

Does the actual import

protected _importExtraOptions (from ManagedAdminController)

unknown $ManagedAdminController->_importExtraOptions ( );

Called when the import form is being built.

Returns HTML of extra options to display, or null if no extra options.

protected _importPost (from ManagedAdminController)

unknown $ManagedAdminController->_importPost ( );

Called at the end of the the import process, after everything has been done.
Is called from within a transaction.
Return FALSE to abort the import.

protected _importPostRecord (from ManagedAdminController)

boolean $ManagedAdminController->_importPostRecord ( int $record_id , array $new_data , array $existing_record , string $type , array $raw_data );

Called after a record has been inserted or updated.

protected _importPre (from ManagedAdminController)

unknown $ManagedAdminController->_importPre ( );

Called at the beginning of the the import process.
Is called from within a transaction.
Return FALSE to abort the import.

protected _importPreRecord (from ManagedAdminController)

unknown $ManagedAdminController->_importPreRecord ( array &$new_data , array $raw_data );

Called after the field data has been determined, but before the insert or update is run.

Return FALSE to skip the record.

public _importUploadForm

unknown $PageAdminController->_importUploadForm ( );

Return HTML for the import upload form

public _intro

unknown $PageAdminController->_intro ( );

Returns the intro HTML for this controller.
Looks for a view named "admin/<controller-name>_intro", and loads it if found.
Otherwise, loads the view, "admin/generic_intro".

public _invalidateCaches

void $PageAdminController->_invalidateCaches ( string $action [, int $item_id ] );

This is called after every add, edit and delete, as well as other (i.e. bulk) actions.
Use it to clear any frontend caches. The default is an empty method.

public _isAddSaved (from ManagedAdminController)

bool $ManagedAdminController->_isAddSaved ( );

Is the "add" action saved?
These may be false if the UI provides its own save mechanism (e.g. multi-add)

public _isDeleteSaved (from ManagedAdminController)

bool $ManagedAdminController->_isDeleteSaved ( int $item_id );

Check if deletion of a particular record is allowed
This method may be overridden if ignoring the $main_delete property is desired

public _isEditSaved (from ManagedAdminController)

bool $ManagedAdminController->_isEditSaved ( mixed $item_id );

Is the "edit" action saved?
These may be false if the UI provides its own save mechanism

protected _modeSelector (from ManagedAdminController)

unknown $ManagedAdminController->_modeSelector ( mixed $current_mode );

Returns HTML for a ui component to update the current main view mode

protected _paginationBar (from ManagedAdminController)

HTML $ManagedAdminController->_paginationBar ( The $current_page , The $total_row_count );

Builds the HTML for showing the navigation through pages in the admin.
This method is FINAL to help keep the user interface consistent.

protected _preSave (from ManagedAdminController)

void $ManagedAdminController->_preSave ( mixed $id , mixed &$data );

This function does not have a description

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.

private addHistoryItem

unknown $PageAdminController->addHistoryItem ( mixed $page_id , mixed $changes_made [, mixed $editor ] );

Adds a history item for a page

public ajaxGetMenuGroups

void $PageAdminController->ajaxGetMenuGroups ( mixed $parent_page_id );

Return a list of menu groups for a selected parent page

public ajaxGetRev

void $PageAdminController->ajaxGetRev ( int $id );

Gets the text of a single revision

public ajaxListWidgetTemplates

void $PageAdminController->ajaxListWidgetTemplates ( );

Return JSON list of custom widget templates as defined by skin config
AJAX called

public ajaxLookup (from ManagedAdminController)

void $ManagedAdminController->ajaxLookup ( );

Return list of records for given search term
Used for Fb::autocomplete

public ajaxLookupList (from ManagedAdminController)

void $ManagedAdminController->ajaxLookupList ( );

Return list of records for given search term
Used for Fb::autocompleteList

protected applyRefineFilter (from ManagedAdminController)

array $ManagedAdminController->applyRefineFilter ( [ array $source_data ] );

Applies filters defined in the query string using a LIKE contains
Only fields which exist in the RefineBar will be filtered

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.

private checkControllerEntrance

bool PageAdminController::checkControllerEntrance ( string $controller , int $page_id );

Validate given controller implements FrontEndEntrance

public clearNavigationCache

void $PageAdminController->clearNavigationCache ( );

Forces a clear of the pagecache

private convertForChangeCheck

unknown $PageAdminController->convertForChangeCheck ( mixed $text );

Makes the provided html text be in a standard format to ensure the integrity of the change check

private createPageTreenode

unknown $PageAdminController->createPageTreenode ( mixed $node , mixed $parent_id , mixed $images , mixed $headings , mixed $operator );

Create a page

public cronCheckStale

void $PageAdminController->cronCheckStale ( );

Check for stale page content and send emails regarding stale pages; to be run via cron

public cronLinkChecker

void $PageAdminController->cronLinkChecker ( );

Cron version of the link checker

public cronPageActivate

unknown $PageAdminController->cronPageActivate ( );

Activates AutoLaunch revisions

public cronPageDeactivate

unknown $PageAdminController->cronPageDeactivate ( );

Deactivates pages after set date

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 filetreeClose

void $PageAdminController->filetreeClose ( );

Saves in the session data the currently open pages in the pages tree (navigation pane)
Uses the POST param 'pages', and is usually run through an AJAX call.

public filetreeOpen

void $PageAdminController->filetreeOpen ( );

Returns the children pages for a specific page, in a format required by jqueryFileTree.
Uses the POST param 'dir', and is usually run through an AJAX call.

protected fixRecordOrder

void $PageAdminController->fixRecordOrder ( int $item_id );

If the specified item needs a record number to be set,
Puts this item at the end of the list.

This custom version adds subsite support

protected generateFormView (from Controller)

array $Controller->generateFormView ( mixed $file_name );

Generates a form view from a JSON config file

public getControllerName (from ManagedAdminController)

unknown $ManagedAdminController->getControllerName ( );

Returns the defined controller name.

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 getDuplicateEnabled (from ManagedAdminController)

unknown $ManagedAdminController->getDuplicateEnabled ( );

Returns the duplication enabling flag

public getFriendlyName (from ManagedAdminController)

unknown $ManagedAdminController->getFriendlyName ( );

Returns the defined controller friendly name

public getModulePath (from BaseController)

string $BaseController->getModulePath ( );

Gets the relative path to the module the controller lives in, or sprout itself

public getNavigationName (from ManagedAdminController)

unknown $ManagedAdminController->getNavigationName ( );

Returns the defined controller navigation name

public getTableName (from ManagedAdminController)

unknown $ManagedAdminController->getTableName ( );

Returns the defined table name

public getTopnavName (from ManagedAdminController)

unknown $ManagedAdminController->getTopnavName ( );

Gets the name of the controller to use for the top nav

public importNotes

void $PageAdminController->importNotes ( mixed $view_name );

Facebox info box

public importPreviewAjax

void $PageAdminController->importPreviewAjax ( );

Preview the pages which will be created

public importUploadAction

void $PageAdminController->importUploadAction ( );

Upload and do initial processing on the file

protected initRefineBar (from ManagedAdminController)

void $ManagedAdminController->initRefineBar ( );

Initialises the refine bar if it isn't already set, with a search widget for the 'name' field if it exists
Most controllers which need a custom refine bar should call this before adding their own search widgets

protected initTableName (from ManagedAdminController)

void $ManagedAdminController->initTableName ( );

Initialises the table name if it isn't already set, using the plural of the shorthand controller name

protected injectVisiblityFields (from ManagedAdminController)

void $ManagedAdminController->injectVisiblityFields ( array &$conf );

Inject the visiblity fields into a loaded json configuration, so they actually save

public isPerSubsite (from ManagedAdminController)

unknown $ManagedAdminController->isPerSubsite ( );

If true, then a UI for editing the "subsite_id" for a record should be shown

protected jsonExtraValidate (from Controller)

void $Controller->jsonExtraValidate ( int $id , Validator $validator );

Do any additional validation prior to saving the record

public linkCheckerAction

void $PageAdminController->linkCheckerAction ( );

Starts the link checker

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 menuGroupsAction

void $PageAdminController->menuGroupsAction ( );

Save the menu groups

public organiseAction (from TreeAdminController)

void $TreeAdminController->organiseAction ( );

Save tree organise form submission, see self::_extraOrganise

public postJsonMultiTag (from ManagedAdminController)

void $ManagedAdminController->postJsonMultiTag ( );

Multi-tag some items. Uses AJAX. Returns JSON.

public postMultiDelete (from ManagedAdminController)

void $ManagedAdminController->postMultiDelete ( );

Delete multiple records

public preview

void $PageAdminController->preview ( [ mixed $item_id ] );

This function does not have a description

public reindexAll

void $PageAdminController->reindexAll ( );

Does a complete re-index of all pages

private reindexItem

unknown $PageAdminController->reindexItem ( mixed $item_id , mixed $name , mixed $text );

Does a re-index for a page

private renderPreviewTreenode

void PageAdminController::renderPreviewTreenode ( mixed $node );

Render a single node for the preview tree we return in `import_preview_ajax`

public reorder (from TreeAdminController)

void $TreeAdminController->reorder ( mixed $id );

Shows the reorder screen (which is shown in a popup box) for re-ordering the children items

public reorderSave (from TreeAdminController)

void $TreeAdminController->reorderSave ( mixed $parent_id );

Saves a tree reorder

public reorderTop

void $PageAdminController->reorderTop ( );

Shows the reorder screen (which is shown in a popup box) for re-ordering the top-level stuff
This custom version adds subsite support

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