src/BoomCMS/Http/Controllers/Editor.php
public function getToolbar(EditorObject $editor, Request $request)
    {
        $page = PageFacade::find($request->input('page_id'));

        View::share([
            'page'   => $page,
            'editor' => $editor,
            'auth'   => auth(),
            'person' => auth()->user(),
        ]);

        if ($editor->isHistory()) {
            return view('boomcms::editor.toolbar.history', [
                'previous' => $page->getCurrentVersion()->getPrevious(),
                'next'     => $page->getCurrentVersion()->getNext(),
                'version'  => $page->getCurrentVersion(),
                'diff'     => new Diff(),
            ]);
        }

        $toolbarFilename = ($editor->isEnabled()) ? 'edit' : 'preview';

        return view("boomcms::editor.toolbar.$toolbarFilename");
    }
public function getToolbar(EditorObject $editor, Request $request)
    {
        $page = PageFacade::find($request->input('page_id'));

        View::share([
            'page'   => $page,
            'editor' => $editor,
            'auth'   => auth(),
            'person' => auth()->user(),
        ]);

        if ($editor->isHistory()) {
            return view('boomcms::editor.toolbar.history', [
                'previous' => $page->getCurrentVersion()->getPrevious(),
                'next'     => $page->getCurrentVersion()->getNext(),
                'version'  => $page->getCurrentVersion(),
                'diff'     => new Diff(),
            ]);
        }

        $toolbarFilename = ($editor->isEnabled()) ? 'edit' : 'preview';

        return view("boomcms::editor.toolbar.$toolbarFilename");
    }
public function getToolbar ( EditorObject $ editor , Request $ request ) { $ page = PageFacade :: find ( $ request -> input ( 'page_id' ) ) ; View :: share ( [ 'page' => $ page , 'editor' => $ editor , 'auth' => auth ( ) , 'person' => auth ( ) -> user ( ) , ] ) ; if ( $ editor -> isHistory ( ) ) { return view ( 'boomcms::editor.toolbar.history' , [ 'previous' => $ page -> getCurrentVersion ( ) -> getPrevious ( ) , 'next' => $ page -> getCurrentVersion ( ) -> getNext ( ) , 'version' => $ page -> getCurrentVersion ( ) , 'diff' => new Diff ( ) , ] ) ; } $ toolbarFilename = ( $ editor -> isEnabled ( ) ) ? 'edit' : 'preview' ; return view ( "boomcms::editor.toolbar.$toolbarFilename" ) ; }
Displays the CMS interface with buttons for add page, settings, etc.
Called from an iframe when logged into the CMS.
Displays the CMS interface with buttons for add page settings etc . Called from an iframe when logged into the CMS .