PHP Class VanillaSettingsController, vanilla

Inheritance: extends Gdn_Controller
显示文件 Open project: vanilla/vanilla

Public Properties

Property Type Description
$CategoryModel CategoryModel
$Form Gdn_Form
$ShowCustomPoints boolean
$Uses Models to include.

Public Methods

Method Description
addCategory ( $parent = '' ) Adding a new category.
addSideMenu ( string $currentUrl = '' )
advanced ( ) Advanced settings.
archive ( )
categories ( string $parent = '' ) Manage the category hierarchy.
categoriesTree ( ) Sorting display order of categories.
categoryDisplayAs ( ) Set the display as property of a category.
deleteCategory ( integer $CategoryID = false ) Deleting a category.
deleteCategoryPhoto ( String $CategoryID = '' ) Delete a category photo.
editCategory ( integer | string $CategoryID = '' ) Editing a category.
enableCategories ( boolean $enabled ) Enable or disable the use of categories in Vanilla.
floodControl ( ) Display flood control options.
getCategory ( integer $categoryID ) Get a single category for administration.
index ( ) Alias for ManageCategories method.
initialize ( ) Switch MasterView. Include JS, CSS used by all methods.
manageCategories ( ) Enabling and disabling categories from list.
moveCategory ( integer $categoryID ) Move a category to a different parent.
setHighlightRoute ( string $currentUrl = '' )
sortCategories ( ) Sorting display order of categories.

Protected Methods

Method Description
setupDiscussionTypes ( $Category )

Private Methods

Method Description
categoryPageByParent ( array | object $category ) : string Move through the category's parents to determine the proper management page URL.

Method Details

addCategory() public method

Adding a new category.
Since: 2.0.0
public addCategory ( $parent = '' )

addSideMenu() public method

public addSideMenu ( string $currentUrl = '' )
$currentUrl string

advanced() public method

Allows setting configuration values via form elements.
Since: 2.0.0
public advanced ( )

archive() public method

public archive ( )

categories() public method

Manage the category hierarchy.
public categories ( string $parent = '' )
$parent string The URL slug of a parent category if looking at a sub tree.

categoriesTree() public method

Sorting display order of categories.
public categoriesTree ( )

categoryDisplayAs() public method

Set the display as property of a category.
public categoryDisplayAs ( )

deleteCategory() public method

Deleting a category.
Since: 2.0.0
public deleteCategory ( integer $CategoryID = false )
$CategoryID integer Unique ID of the category to be deleted.

deleteCategoryPhoto() public method

Delete a category photo.
Since: 2.1
public deleteCategoryPhoto ( String $CategoryID = '' )
$CategoryID String Unique ID of the category to have its photo deleted.

editCategory() public method

Editing a category.
Since: 2.0.0
public editCategory ( integer | string $CategoryID = '' )
$CategoryID integer | string Unique ID of the category to be updated.

enableCategories() public method

Enable or disable the use of categories in Vanilla.
public enableCategories ( boolean $enabled )
$enabled boolean Whether or not to enable/disable categories.

floodControl() public method

Display flood control options.
Since: 2.0.0
public floodControl ( )

getCategory() public method

This endpoint is intended for API access.
public getCategory ( integer $categoryID )
$categoryID integer The category to find.

index() public method

Alias for ManageCategories method.
Since: 2.0.0
public index ( )

initialize() public method

Always called by dispatcher before controller's requested method.
Since: 2.0.0
public initialize ( )

manageCategories() public method

Enabling and disabling categories from list.
Since: 2.0.0
public manageCategories ( )

moveCategory() public method

Move a category to a different parent.
public moveCategory ( integer $categoryID )
$categoryID integer Unique ID for the category to move.

setHighlightRoute() public method

public setHighlightRoute ( string $currentUrl = '' )
$currentUrl string

setupDiscussionTypes() protected method

protected setupDiscussionTypes ( $Category )
$Category

sortCategories() public method

Accessed by ajax so its default is to only output true/false.
Since: 2.0.0
public sortCategories ( )

Property Details

$CategoryModel public_oe property

public CategoryModel $CategoryModel
return CategoryModel

$Form public_oe property

public Gdn_Form $Form
return Gdn_Form

$ShowCustomPoints public_oe property

public bool $ShowCustomPoints
return boolean

$Uses public_oe property

Models to include.
public $Uses