PHP Class Piwik\Widget\WidgetContainerConfig

To define a widget container just place a subclass within the Widgets folder of your plugin.
Inheritance: extends WidgetConfig
Mostra file Open project: piwik/piwik Class Usage Examples

Protected Properties

Property Type Description
$action
$id
$isWidgetizable
$layout
$module
$widgets WidgetConfig[]

Public Methods

Method Description
addWidgetConfig ( WidgetConfig $widget ) : static Adds a new widget to the container widget.
getId ( ) : string Get the id of the widget.
getLayout ( ) : string Gets the currently set layout.
getParameters ( )
getUniqueId ( )
getWidgetConfigs ( ) : WidgetConfig[] Get all added widget configs.
setId ( string $id ) : static Sets (overwrites) the id of the widget container.
setLayout ( string $layout ) : static Sets the layout of the container widget.

Method Details

addWidgetConfig() public method

Adds a new widget to the container widget.
public addWidgetConfig ( WidgetConfig $widget ) : static
$widget WidgetConfig
return static

getId() public method

Get the id of the widget.
public getId ( ) : string
return string

getLayout() public method

Gets the currently set layout.
public getLayout ( ) : string
return string

getParameters() public method

public getParameters ( )

getUniqueId() public method

public getUniqueId ( )

getWidgetConfigs() public method

Get all added widget configs.
public getWidgetConfigs ( ) : WidgetConfig[]
return WidgetConfig[]

setId() public method

The id can be used by any plugins to add more widgets to this container and it will be also used for the unique widget id and in the URL to render this widget.
public setId ( string $id ) : static
$id string eg 'Products' or 'Contents'
return static

setLayout() public method

By default widgets within a container are displayed one after another. In case you want to change this behaviour you can specify a layout that will be recognized by the UI. It is not yet possible to define custom layouts.
public setLayout ( string $layout ) : static
$layout string eg 'ByDimension' see {@link Piwik\Plugins\CoreHome\CoreHome::WIDGET_CONTAINER_LAYOUT_BY_DIMENSION}
return static

Property Details

$action protected_oe property

protected $action

$id protected_oe property

protected $id

$isWidgetizable protected_oe property

protected $isWidgetizable

$layout protected_oe property

protected $layout

$module protected_oe property

protected $module

$widgets protected_oe property

protected WidgetConfig[],Piwik\Widget $widgets
return WidgetConfig[]