src/Theme.php
public function of($view, $args = array(), $type = null)
    {
        // Layout.
        $layout = ucfirst($this->layout);

        // Fire event global assets.
        $this->fire('asset', $this->asset);

        // Fire event before render theme.
        $this->fire('beforeRenderTheme', $this);

        // Fire event before render layout.
        $this->fire('beforeRenderLayout.'.$this->layout, $this);

        // Keeping arguments.
        $this->arguments = $args;

        // Compile string blade, string twig, or from file path.
        switch ($type) {
            case 'blade' :
                $content = $this->bladerWithOutServerScript($view, $args);
                break;
            case 'twig' :
                $content = $this->twigy($view, $args);
                break;
            default :
                $content = $this->view->make($view, $args)->render();
                break;
        }

        // View path of content.
        $this->content = $view;

        // Set up a content regional.
        $this->regions['content'] = $content;

        return $this;
    }
public function of($view, $args = array(), $type = null)
    {
        // Layout.
        $layout = ucfirst($this->layout);

        // Fire event global assets.
        $this->fire('asset', $this->asset);

        // Fire event before render theme.
        $this->fire('beforeRenderTheme', $this);

        // Fire event before render layout.
        $this->fire('beforeRenderLayout.'.$this->layout, $this);

        // Keeping arguments.
        $this->arguments = $args;

        // Compile string blade, string twig, or from file path.
        switch ($type) {
            case 'blade' :
                $content = $this->bladerWithOutServerScript($view, $args);
                break;
            case 'twig' :
                $content = $this->twigy($view, $args);
                break;
            default :
                $content = $this->view->make($view, $args)->render();
                break;
        }

        // View path of content.
        $this->content = $view;

        // Set up a content regional.
        $this->regions['content'] = $content;

        return $this;
    }
public function of ( $ view , $ args = array ( ) , $ type = null ) { // Layout. $ layout = ucfirst ( $ this -> layout ) ; // Fire event global assets. $ this -> fire ( 'asset' , $ this -> asset ) ; // Fire event before render theme. $ this -> fire ( 'beforeRenderTheme' , $ this ) ; // Fire event before render layout. $ this -> fire ( 'beforeRenderLayout.' . $ this -> layout , $ this ) ; // Keeping arguments. $ this -> arguments = $ args ; // Compile string blade, string twig, or from file path. switch ( $ type ) { case 'blade' : $ content = $ this -> bladerWithOutServerScript ( $ view , $ args ) ; break ; case 'twig' : $ content = $ this -> twigy ( $ view , $ args ) ; break ; default : $ content = $ this -> view -> make ( $ view , $ args ) -> render ( ) ; break ; } // View path of content. $ this -> content = $ view ; // Set up a content regional. $ this -> regions [ 'content' ] = $ content ; return $ this ; }
Set up a content to template.

@param  string $view
@param  array  $args
@param  string $type
@return Theme
Set up a content to template .