0 follower

Final Class Yiisoft\View\State\ThemeState

InheritanceYiisoft\View\State\ThemeState

Public Methods

Hide inherited 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

Hide inherited methods

__construct() public method

public mixed __construct ( Yiisoft\View\Theme|null $theme null )
$theme Yiisoft\View\Theme|null

                public function __construct(
    private ?Theme $theme = null
) {
}

            
getTheme() public method

Gets the theme instance, or null if no theme has been set.

public Yiisoft\View\Theme|null getTheme ( )
return Yiisoft\View\Theme|null

The theme instance, or null if no theme has been set.

                public function getTheme(): ?Theme
{
    return $this->theme;
}

            
setTheme() public method

Set the specified view theme.

public self setTheme ( Yiisoft\View\Theme|null $theme )
$theme Yiisoft\View\Theme|null

$theme The theme instance or null for reset theme.

                public function setTheme(?Theme $theme): self
{
    $this->theme = $theme;
    return $this;
}