Property | Type | Description | |
---|---|---|---|
$columnName | string | This will be the name of the column in the database table if a $columnType is specified. | |
$columnType | string | If a columnType is defined, we will create a column in the MySQL table having this type. Please make sure MySQL understands this type. Once you change the column type the Piwik platform will notify the user to perform an update which can sometimes take a long time so be careful when choosing the correct column type. | |
$segments | Piwik\Plugin\Segment[] | Holds an array of segment instances |
Method | Description | |
---|---|---|
factory ( string $dimensionId ) : |
Creates a Dimension instance from a string ID (see {@link getId()}). | |
getAllDimensions ( ) : |
Gets an instance of all available visit, action and conversion dimension. | |
getColumnName ( ) : string | Get the name of the dimension column. | |
getDimensions ( |
||
getId ( ) : string | Returns a unique string ID for this dimension. The ID is built using the namespaced class name of the dimension, but is modified to be more human readable. | |
getModule ( ) : string | Returns the name of the plugin that contains this Dimension. | |
getName ( ) : string | Get the translated name of the dimension. Defaults to an empty string. | |
getSegments ( ) : Piwik\Plugin\Segment[] | Get the list of configured segments. | |
hasColumnType ( ) : boolean | Check whether the dimension has a column type configured | |
hasImplementedEvent ( $method ) : boolean | Check whether a dimension has overwritten a specific method. |
Method | Description | |
---|---|---|
addSegment ( Piwik\Plugin\Segment $segment ) | Adds a new segment. The segment type will be set to 'dimension' automatically if not already set. | |
configureSegments ( ) | Overwrite this method to configure segments. To do so just create an instance of a {@link \Piwik\Plugin\Segment} class, configure it and call the {@link addSegment()} method. You can add one or more segments for this dimension. Example: |
protected addSegment ( Piwik\Plugin\Segment $segment ) | ||
$segment | Piwik\Plugin\Segment |
protected configureSegments ( ) |
public static getAllDimensions ( ) : |
||
return |
public getColumnName ( ) : string | ||
return | string |
public static getDimensions ( |
||
$plugin |
public getSegments ( ) : Piwik\Plugin\Segment[] | ||
return | Piwik\Plugin\Segment[] |
public hasColumnType ( ) : boolean | ||
return | boolean |
public hasImplementedEvent ( $method ) : boolean | ||
$method | ||
return | boolean |
protected string $columnName | ||
return | string |
protected string $columnType | ||
return | string |