Skip to content
PHP Ecosystem
Explore

WidgetConfiguration

API reference › PHPStan › rules › WidgetConfiguration

final readonly classyii2\extensions\phpstan\rules\WidgetConfiguration
Sourcesrc/rules/WidgetConfiguration.php

Represents the configuration of a Widget::widget() or Widget::begin() call whose class and assignment path are proven.

WidgetConfigurationResolver for the conditions under which a configuration is resolved.

PropertyTypeDescriptionDefined by
$configuration readonly constructorCreateObjectConfigurationConfiguration that Yii::createObject() receives from the method: the called class as PHPStan displays it, the widget class Yii creates and the options it assigns.WidgetConfiguration
$method readonly constructorstringName of the called method as Widget declares it: widget or begin.WidgetConfiguration
MethodDescriptionDefined by
__construct()Stores the widget creation method and its resolved configuration.WidgetConfiguration
public function __construct(string $method, yii2\extensions\phpstan\rules\CreateObjectConfiguration $configuration)

Stores the widget creation method and its resolved configuration.

Parameters

ParameterTypeDescription
$methodstringName of the called method as Widget declares it: widget or begin.
$configurationCreateObjectConfigurationConfiguration that Yii::createObject() receives from the method: the called class as PHPStan displays it, the widget class Yii creates and the options it assigns.