Final Class Yiisoft\Yii\Twig\Extension\WebViewExtension
| Inheritance | Yiisoft\ |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| getFunctions() | Yiisoft\ |
Method Details
| public mixed __construct ( \ | ||
| $view | \ |
|
public function __construct(private readonly WebView $view) {}
| public mixed getFunctions ( ) |
public function getFunctions()
{
$options = ['is_safe' => ['html']];
return [
new TwigFunction('title', $this->view->getTitle(...), $options),
new TwigFunction('head', $this->view->head(...), $options),
];
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.