Final Class Yiisoft\View\State\ThemeState
| Inheritance | Yiisoft\View\State\ThemeState |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\View\State\ThemeState | |
| getTheme() | Gets the theme instance, or null if no theme has been set. |
Yiisoft\View\State\ThemeState |
| setTheme() | Set the specified view theme. | Yiisoft\View\State\ThemeState |
Method Details
| public __construct( Yiisoft\View\Theme|null $theme = null ): mixed | ||
| $theme | Yiisoft\View\Theme|null | |
public function __construct(
private ?Theme $theme = null,
) {}
Gets the theme instance, or null if no theme has been set.
| public getTheme( ): Yiisoft\View\Theme|null | ||
| return | Yiisoft\View\Theme|null |
The theme instance, or |
|---|---|---|
public function getTheme(): ?Theme
{
return $this->theme;
}
Set the specified view theme.
| public setTheme( Yiisoft\View\Theme|null $theme ): self | ||
| $theme | Yiisoft\View\Theme|null |
$theme The theme instance or |
public function setTheme(?Theme $theme): self
{
$this->theme = $theme;
return $this;
}
Signup or Login in order to comment.