PHP Class FlatCategoryModule, vanilla

Inheritance: extends Gdn_Module
Mostrar archivo Open project: vanilla/vanilla

Public Properties

Property Type Description
$categoryID Category identifier. Can be the slug or the category's ID.
$filter Filter output by name.
$limit Limit on the number of categories displayed.

Public Methods

Method Description
__construct ( string | Gdn_Controller $sender = '', boolean | string $applicationFolder = false ) FlatCategoryModule constructor.
assetTarget ( ) : string Returns the name of the asset where this component should be rendered.
getCategory ( ) : array | null Get data for the configured category.
getChildren ( ) : array | null Get a list of immediate children for the configured category.
getFilter ( ) : null | string Get the value to be used for filtering categories by name, if any.
getLimit ( ) : integer Get the configured record limit.
toString ( ) : string Returns the component as a string to be rendered to the screen.

Method Details

__construct() public method

FlatCategoryModule constructor.
public __construct ( string | Gdn_Controller $sender = '', boolean | string $applicationFolder = false )
$sender string | Gdn_Controller
$applicationFolder boolean | string

assetTarget() public method

Returns the name of the asset where this component should be rendered.
public assetTarget ( ) : string
return string

getCategory() public method

Get data for the configured category.
public getCategory ( ) : array | null
return array | null Array if the configured category is valid. Otherwise, null.

getChildren() public method

Get a list of immediate children for the configured category.
public getChildren ( ) : array | null
return array | null

getFilter() public method

Get the value to be used for filtering categories by name, if any.
public getFilter ( ) : null | string
return null | string

getLimit() public method

Get the configured record limit.
public getLimit ( ) : integer
return integer

toString() public method

Returns the component as a string to be rendered to the screen.
public toString ( ) : string
return string

Property Details

$categoryID public_oe property

Category identifier. Can be the slug or the category's ID.
public $categoryID

$filter public_oe property

Filter output by name.
public $filter

$limit public_oe property

Limit on the number of categories displayed.
public $limit