public function viewMode($slug = null)
    {
        if ($slug === null) {
            return ViewModeRegistry::current();
        }

        return ViewModeRegistry::uses($slug);
    }
public function viewMode($slug = null)
    {
        if ($slug === null) {
            return ViewModeRegistry::current();
        }

        return ViewModeRegistry::uses($slug);
    }
public function viewMode ( $ slug = null ) { if ( $ slug === null ) { return ViewModeRegistry :: current ( ) ; } return ViewModeRegistry :: uses ( $ slug ) ; }
Sets a view mode or get current view mode.

@param string|null $slug Slug name of the view mode
@return void
@see \CMS\View\ViewModeRegistry::uses()
Sets a view mode or get current view mode .