App\UIObjects\WidgetBox\WidgetBox::render PHP Method

render() public method

public render ( )
    public function render()
    {
        $args = $this->arguments;
        $widgetbox = null;
        $id = array_get($args, 'id');
        if ($id === null) {
            $widgetbox = array_get($args, 'widgetbox');
        }
        $handler = app('xe.widgetbox');
        $parser = app('xe.widget.parser');
        if ($widgetbox === null) {
            $widgetbox = $handler->find($id);
        }
        $content = null;
        if ($widgetbox) {
            $content = $widgetbox->content;
            $this->loadFiles();
        }
        $link = array_get($args, 'link');
        $this->template = view($this->view, compact('widgetbox', 'id', 'content', 'link'))->render();
        return parent::render();
    }