yii\twig\Extension::viewHelper PHP Method

viewHelper() public method

Used for 'begin_page', 'end_page', 'begin_body', 'end_body', 'head'
public viewHelper ( array $context, string $name = null )
$context array context information
$name string
    public function viewHelper($context, $name = null)
    {
        if ($name !== null && isset($context['this'])) {
            $this->call($context['this'], Inflector::variablize($name));
        }
    }