Свойство | Type | Description | |
---|---|---|---|
$autoIdPrefix | the prefix to the automatically generated widget IDs. | ||
$counter | a counter used to generate [[id]] for widgets. | ||
$stack | the widgets that are currently being rendered (not ended). This property is maintained by WidgetTrait::begin and WidgetTrait::end methods. |
Méthode | Description | |
---|---|---|
begin ( array $config = [] ) : static | Begins a widget. | |
end ( ) : static | Ends a widget. | |
getId ( boolean $autoGenerate = true ) : string | Returns the ID of the widget. | |
getView ( ) : |
Returns the view object that can be used to render views or view files. | |
getViewPath ( ) : string | Returns the directory containing the view files for this widget. | |
render ( string $view, array $params = [] ) : string | Renders a view. | |
renderFile ( string $file, array $params = [] ) : string | Renders a view file. | |
run ( ) : string | Executes the widget. | |
setId ( string $value ) | Sets the ID of the widget. | |
setView ( View $view ) | Sets the view object to be used by this widget. | |
widget ( array $config = [] ) : string | Creates a widget instance and runs it. |
public static end ( ) : static | ||
Résultat | static | the widget instance that is ended. |
public getView ( ) : |
||
Résultat | the view object that can be used to render views or view files. |
public getViewPath ( ) : string | ||
Résultat | string | the directory containing the view files for this widget. |
public setView ( View $view ) | ||
$view | View | the view object that can be used to render views or view files. |
public static $autoIdPrefix |
public static $counter |
public static $stack |