Pagekit\View\Helper\DataHelper::render PHP Method

render() public method

Renders the data tags.
public render ( ) : string
return string
    public function render()
    {
        $output = '';
        foreach ($this->data as $name => $value) {
            $output .= sprintf("        <script>var %s = %s;</script>\n", $name, json_encode($value, $this->encodingOptions));
        }
        return $output;
    }