concrete/src/Editor/CkeditorEditor.php
private function getEditorSnippetsAndClasses()
    {
        $obj = new stdClass();
        $obj->snippets = [];
        $u = new User();
        if ($u->isRegistered()) {
            $snippets = \Concrete\Core\Editor\Snippet::getActiveList();
            foreach ($snippets as $sns) {
                $menu = new stdClass();
                $menu->scsHandle = $sns->getSystemContentEditorSnippetHandle();
                $menu->scsName = $sns->getSystemContentEditorSnippetName();
                $obj->snippets[] = $menu;
            }
        }
        $c = Page::getCurrentPage();
        $obj->classes = [];
        if (is_object($c) && !$c->isError()) {
            $cp = new Permissions($c);
            if ($cp->canViewPage()) {
                $pt = $c->getCollectionThemeObject();
                if (is_object($pt)) {
                    if ($pt->getThemeHandle()) {
                        $obj->classes = $pt->getThemeEditorClasses();
                    } else {
                        $siteTheme = $pt::getSiteTheme();
                        if (is_object($siteTheme)) {
                            $obj->classes = $siteTheme->getThemeEditorClasses();
                        }
                    }
                }
            }
        } else {
            $siteTheme = PageTheme::getSiteTheme();
            if (is_object($siteTheme)) {
                $obj->classes = $siteTheme->getThemeEditorClasses();
            }
        }

        return $obj;
    }
private function getEditorSnippetsAndClasses()
    {
        $obj = new stdClass();
        $obj->snippets = [];
        $u = new User();
        if ($u->isRegistered()) {
            $snippets = \Concrete\Core\Editor\Snippet::getActiveList();
            foreach ($snippets as $sns) {
                $menu = new stdClass();
                $menu->scsHandle = $sns->getSystemContentEditorSnippetHandle();
                $menu->scsName = $sns->getSystemContentEditorSnippetName();
                $obj->snippets[] = $menu;
            }
        }
        $c = Page::getCurrentPage();
        $obj->classes = [];
        if (is_object($c) && !$c->isError()) {
            $cp = new Permissions($c);
            if ($cp->canViewPage()) {
                $pt = $c->getCollectionThemeObject();
                if (is_object($pt)) {
                    if ($pt->getThemeHandle()) {
                        $obj->classes = $pt->getThemeEditorClasses();
                    } else {
                        $siteTheme = $pt::getSiteTheme();
                        if (is_object($siteTheme)) {
                            $obj->classes = $siteTheme->getThemeEditorClasses();
                        }
                    }
                }
            }
        } else {
            $siteTheme = PageTheme::getSiteTheme();
            if (is_object($siteTheme)) {
                $obj->classes = $siteTheme->getThemeEditorClasses();
            }
        }

        return $obj;
    }
private function getEditorSnippetsAndClasses ( ) { $ obj = new stdClass ( ) ; $ obj -> snippets = [ ] ; $ u = new User ( ) ; if ( $ u -> isRegistered ( ) ) { $ snippets = \ Concrete \ Core \ Editor \ Snippet :: getActiveList ( ) ; foreach ( $ snippets as $ sns ) { $ menu = new stdClass ( ) ; $ menu -> scsHandle = $ sns -> getSystemContentEditorSnippetHandle ( ) ; $ menu -> scsName = $ sns -> getSystemContentEditorSnippetName ( ) ; $ obj -> snippets [ ] = $ menu ; } } $ c = Page :: getCurrentPage ( ) ; $ obj -> classes = [ ] ; if ( is_object ( $ c ) && ! $ c -> isError ( ) ) { $ cp = new Permissions ( $ c ) ; if ( $ cp -> canViewPage ( ) ) { $ pt = $ c -> getCollectionThemeObject ( ) ; if ( is_object ( $ pt ) ) { if ( $ pt -> getThemeHandle ( ) ) { $ obj -> classes = $ pt -> getThemeEditorClasses ( ) ; } else { $ siteTheme = $ pt :: getSiteTheme ( ) ; if ( is_object ( $ siteTheme ) ) { $ obj -> classes = $ siteTheme -> getThemeEditorClasses ( ) ; } } } } } else { $ siteTheme = PageTheme :: getSiteTheme ( ) ; if ( is_object ( $ siteTheme ) ) { $ obj -> classes = $ siteTheme -> getThemeEditorClasses ( ) ; } } return $ obj ; }
Build an object containing the CKEditor preconfigured snippets and classes.

@return \stdClass
Build an object containing the CKEditor preconfigured snippets and classes .