PHP Class CategoriesController, vanilla

Inheritance: extends MY_Controller
Datei anzeigen Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$Category Category object.
$CategoryID Unique identifier.
$CategoryModel CategoryModel
$ShowOptions Should the discussions have their options available.
$Uses Models to include.

Public Methods

Method Description
__get ( $Name )
all ( string $Category = '', string $displayAs = '' ) Show all (nested) categories.
apiV1List ( ) Returns the full list of categories for the APIv1.
archives ( $Category, $Month, boolean $Page = false )
data ( $Path, $Default = '' )
discussions ( string $Category = '' ) Show all categories and few discussions from each.
index ( string $CategoryIdentifier = '', $Page = '0' ) Show all discussions in a particular category.
initialize ( ) Highlight route.
table ( string $Category = '', string $displayAs = '' ) "Table" layout for categories. Mimics more traditional forum category layout.
tree ( $category = '' )

Private Methods

Method Description
getCategoryTree ( integer | string | object | array | null $category = null, string | null $displayAs = null, boolean $recent = false, boolean $watching = false ) : array Build a structured tree of children for the specified category.

Method Details

__get() public method

public __get ( $Name )

all() public method

Show all (nested) categories.
Since: 2.0.17
public all ( string $Category = '', string $displayAs = '' )
$Category string The url code of the parent category.
$displayAs string

apiV1List() public method

Returns the full list of categories for the APIv1.
public apiV1List ( )

archives() public method

public archives ( $Category, $Month, boolean $Page = false )
$Category
$Month
$Page boolean

data() public method

public data ( $Path, $Default = '' )

discussions() public method

Show all categories and few discussions from each.
Since: 2.0.0
public discussions ( string $Category = '' )
$Category string The url code of the parent category.

index() public method

Show all discussions in a particular category.
Since: 2.0.0
public index ( string $CategoryIdentifier = '', $Page = '0' )
$CategoryIdentifier string Unique category slug or ID.

initialize() public method

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

table() public method

"Table" layout for categories. Mimics more traditional forum category layout.
public table ( string $Category = '', string $displayAs = '' )
$Category string
$displayAs string

tree() public method

public tree ( $category = '' )

Property Details

$Category public_oe property

Category object.
public $Category

$CategoryID public_oe property

Unique identifier.
public $CategoryID

$CategoryModel public_oe property

public CategoryModel $CategoryModel
return CategoryModel

$ShowOptions public_oe property

Should the discussions have their options available.
public $ShowOptions

$Uses public_oe property

Models to include.
public $Uses