An abstract class for controllers of things which have categories.
This is the code documentation for the SproutCMS project
Search documentation |
class HasCategoriesAdminControllerAn abstract class for controllers of things which have categories.
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-15
**/
class NewClassName extends HasCategoriesAdminController {
/**
* Form to change the categories for a number of records
**/
public function _extraMultiCategorise () {
// Method code goes here
}
/**
* Change the categories for a number of records
**/
public function postMultiCategorise () {
// Method code goes here
}
/**
* Updates the category table for this controller (so for articles, the updated table will be articles_cat_join)
* so that the records for the specified item match the category ids provided.
**/
protected function updateCategories ($item_id, array $categories) {
// Method code goes here
}
/**
* Returns the edit form for adding a record
**/
public function _getEditForm (int $id) {
// Method code goes here
}
/**
* Returns the edit form for duplicating a record
**/
public function _getDuplicateForm (int $id) {
// Method code goes here
}
/**
* Deletes an item and logs the deleted data
*
* This method should not be overridden unless absolutely necessary.
**/
public function _deleteSave (int $item_id) {
// Method code goes here
}
/**
* Formats a resultset of items into an Itemlist
**/
public function _getContentsViewList (Traversable $items, StdClass $category) {
// Method code goes here
}
/**
* Called when the import form is being built.
*
* Returns HTML of extra options to display, or null if no extra options.
**/
protected function _importExtraOptions () {
// Method code goes here
}
/**
* Called after a record has been inserted or updated.
**/
protected function _importPostRecord (int $record_id, array $new_data, array $existing_record, string $type, boolean $raw_data) {
// Method code goes here
}
/**
* Returns a page title and HTML for a form to add a record
**/
public function _getAddForm () {
// Method code goes here
}
/**
* Returns the contents of the navigation pane
**/
public function _getNavigation () {
// Method code goes here
}
/**
* Additional categry tools
**/
public function _getTools () {
// Method code goes here
}
/**
* 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'.
**/
protected function _getRefineClause (string $key, string $val, array $query_params) {
// Method code goes here
}
/**
* Return HTML for a resultset of items
* The returned HTML will be sandwiched between the refinebar and the pagination bar.
**/
public function _getContentsView (Traversable $items, string $mode, StdClass $category) {
// Method code goes here
}
/**
* Returns the main list of records for this controller
**/
public function _getContents () {
// Method code goes here
}
/**
* Constructor
**/
public function __construct () {
// Method code goes here
}
/**
* Return true if categories are allowed to be added.
**/
public function catAllowAdd () {
// Method code goes here
}
/**
* Return true if categories are allowed to be edited.
**/
public function catAllowEdit ($category_id) {
// Method code goes here
}
/**
* Return true if categories are allowed to be deleted.
**/
public function catAllowDelete ($category_id) {
// 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 |
|