PHP Class Piwik\Category\Category

This class is for now not exposed as public API until needed. Categories of plugins will be automatically displayed in the menu at the very right after all core categories.
Show file Open project: piwik/piwik Class Usage Examples

Protected Properties

Property Type Description
$icon integer The icon for this category, eg 'icon-user'
$id The id of the category as specified eg in {@link Piwik\Widget\WidgetConfig::setCategoryId()`} or {@link Piwik\Report\getCategoryId()}. The id is used as the name in the menu and will be visible in the URL.
$order integer The order of the category. The lower the value the further left the category will appear in the menu.
$subcategories Subcategory[]

Public Methods

Method Description
addSubcategory ( Subcategory $subcategory )
getIcon ( )
getId ( )
getOrder ( )
getSubcategories ( ) : Subcategory[]
getSubcategory ( $subcategoryId )
hasSubCategories ( )
hasSubcategory ( $subcategoryId )
setIcon ( $icon )
setId ( $id )
setOrder ( integer $order ) : static

Method Details

addSubcategory() public method

public addSubcategory ( Subcategory $subcategory )
$subcategory Subcategory

getIcon() public method

public getIcon ( )

getId() public method

public getId ( )

getOrder() public method

public getOrder ( )

getSubcategories() public method

public getSubcategories ( ) : Subcategory[]
return Subcategory[]

getSubcategory() public method

public getSubcategory ( $subcategoryId )

hasSubCategories() public method

public hasSubCategories ( )

hasSubcategory() public method

public hasSubcategory ( $subcategoryId )

setIcon() public method

public setIcon ( $icon )

setId() public method

public setId ( $id )

setOrder() public method

public setOrder ( integer $order ) : static
$order integer
return static

Property Details

$icon protected property

The icon for this category, eg 'icon-user'
protected int $icon
return integer

$id protected property

The id of the category as specified eg in {@link Piwik\Widget\WidgetConfig::setCategoryId()`} or {@link Piwik\Report\getCategoryId()}. The id is used as the name in the menu and will be visible in the URL.
protected $id

$order protected property

The order of the category. The lower the value the further left the category will appear in the menu.
protected int $order
return integer

$subcategories protected property

protected Subcategory[],Piwik\Category $subcategories
return Subcategory[]