PHP 클래스 Piwik\Category\Subcategory
All widgets within a subcategory will be rendered in the Piwik reporting UI under the same page. By default
you do not have to specify any subcategory as they are created automatically. Only create a subcategory if you
want to change the name for a specific subcategoryId or if you want to specifiy a different order so the subcategory
appears eg at a different order in the reporting menu. It also affects the order of reports in
API.getReportMetadata and wherever we display any reports.
To define a subcategory just place a subclass within the
Categories folder of your plugin.
Subcategories can also be added through the {@hook Subcategory.addSubcategories} event.
파일 보기
프로젝트 열기: piwik/piwik
1 사용 예제들
보호된 프로퍼티들
프로퍼티 |
타입 |
설명 |
|
$categoryId |
|
See {@link Piwik\Widget\WidgetConfig::setCategoryId()`} or {@link Piwik\Report\getCategoryId()}. |
|
$id |
|
For example you might want to have the actual GoalId (eg '4') in the URL but the actual goal name in the
submenu (eg 'Downloads'). In this case one should specify $id=4;$name='Downloads'. |
|
$name |
string |
The name that shall be used in the menu etc, defaults to the specified {@link $id}. See {@link $id}. |
|
$order |
integer |
The order of the subcategory. The lower the value the earlier a widget or a report will be displayed. |
|
공개 메소드들
메소드 |
설명 |
|
getCategoryId ( ) : string |
Get the specifed categoryId see {@link $categoryId}. |
|
getId ( ) : string |
Get the id of the subcategory. |
|
getName ( ) : string |
Get the name of the subcategory. |
|
getOrder ( ) : integer |
Get the order of the subcategory. |
|
setCategoryId ( string $categoryId ) : static |
Sets (overwrites) the categoryId see {@link $categoryId}. |
|
setId ( string $id ) : static |
Sets (overwrites) the id of the subcategory see {@link $id}. |
|
setName ( string $name ) : static |
Sets (overwrites) the name see {@link $name} and {@link $id}. |
|
setOrder ( integer $order ) : static |
Sets (overwrites) the order see {@link $order}. |
|
메소드 상세
Get the specifed categoryId see {@link $categoryId}.
Get the id of the subcategory.
Get the name of the subcategory.
Get the order of the subcategory.
Sets (overwrites) the categoryId see {@link $categoryId}.
Sets (overwrites) the id of the subcategory see {@link $id}.
public setId ( string $id ) : static |
$id |
string |
A translation key eg 'General_Overview'. |
리턴 |
static |
|
Sets (overwrites) the name see {@link $name} and {@link $id}.
public setName ( string $name ) : static |
$name |
string |
A translation key eg 'General_Overview'. |
리턴 |
static |
|
Sets (overwrites) the order see {@link $order}.
프로퍼티 상세
See {@link Piwik\Widget\WidgetConfig::setCategoryId()`} or {@link Piwik\Report\getCategoryId()}.
For example you might want to have the actual GoalId (eg '4') in the URL but the actual goal name in the
submenu (eg 'Downloads'). In this case one should specify $id=4;$name='Downloads'.
The name that shall be used in the menu etc, defaults to the specified {@link $id}. See {@link $id}.
protected string $name |
리턴 |
string |
|
The order of the subcategory. The lower the value the earlier a widget or a report will be displayed.