Class BuildWidgetEvent.

This event is being emitted when the widget manager wants to create a new widget instance.

 Methods

Create a new event.

__construct(\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface $environment, \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface $model, \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\PropertyInterface $property) 

Parameters

$environment

\ContaoCommunityAlliance\DcGeneral\EnvironmentInterface

The environment instance in use.

$model

\ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

The model holding the data for the widget that shall be instantiated.

$property

\ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\PropertyInterface

The property for which the widget shall be instantiated.

Retrieve the property definition from the event for which the widget shall be instantiated.

getProperty() : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\PropertyInterface

Retrieve the widget instance from the event.

getWidget() : \Widget

Returns

Stores the widget instance into the event.

setWidget(\Widget $widget) : \ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\BuildWidgetEvent

 Properties

 

The property for which a widget shall get instantiated.

$property : \ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\Properties\PropertyInterface
 

The instantiated widget.

$widget : \Widget

 Constants

 

The name of the event.

NAME