public function getViewBag()
    {
        if ($this->viewBagCache !== false) {
            return $this->viewBagCache;
        }

        $componentName = 'viewBag';

        if (!isset($this->settings['components'][$componentName])) {
            $viewBag = new ViewBag(null, []);
            $viewBag->name = $componentName;

            return $this->viewBagCache = $viewBag;
        }

        return $this->viewBagCache = $this->getComponent($componentName);
    }
public function getViewBag()
    {
        if ($this->viewBagCache !== false) {
            return $this->viewBagCache;
        }

        $componentName = 'viewBag';

        if (!isset($this->settings['components'][$componentName])) {
            $viewBag = new ViewBag(null, []);
            $viewBag->name = $componentName;

            return $this->viewBagCache = $viewBag;
        }

        return $this->viewBagCache = $this->getComponent($componentName);
    }
public function getViewBag ( ) { if ( $ this -> viewBagCache !== false ) { return $ this -> viewBagCache ; } $ componentName = 'viewBag' ; if ( ! isset ( $ this -> settings [ 'components' ] [ $ componentName ] ) ) { $ viewBag = new ViewBag ( null , [ ] ) ; $ viewBag -> name = $ componentName ; return $ this -> viewBagCache = $ viewBag ; } return $ this -> viewBagCache = $ this -> getComponent ( $ componentName ) ; }
Returns the configured view bag component.
This method is used only in the back-end and for internal system needs when
the standard way to access components is not an option.
@return \Cms\Components\ViewBag Returns the view bag component instance.
Returns the configured view bag component . This method is used only in the back - end and for internal system needs when the standard way to access components is not an option .