public static function getRichEditorTypeInfo(string $type)
    {
        $result = [];

        if ($type === 'cms-page') {
            $theme = Theme::getActiveTheme();
            $pages = self::listInTheme($theme, true);

            foreach ($pages as $page) {
                $url = self::url($page->getBaseFileName());
                $result[$url] = $page->title;
            }
        }

        return $result;
    }
public static function getRichEditorTypeInfo(string $type)
    {
        $result = [];

        if ($type === 'cms-page') {
            $theme = Theme::getActiveTheme();
            $pages = self::listInTheme($theme, true);

            foreach ($pages as $page) {
                $url = self::url($page->getBaseFileName());
                $result[$url] = $page->title;
            }
        }

        return $result;
    }
public static function getRichEditorTypeInfo ( string $ type ) { $ result = [ ] ; if ( $ type === 'cms-page' ) { $ theme = Theme :: getActiveTheme ( ) ; $ pages = self :: listInTheme ( $ theme , true ) ; foreach ( $ pages as $ page ) { $ url = self :: url ( $ page -> getBaseFileName ( ) ) ; $ result [ $ url ] = $ page -> title ; } } return $ result ; }
Handler for the backend.richeditor.getTypeInfo event.
Returns a menu item type information. The type information is returned as array
@param string $type Specifies the page link type
@return array
Handler for the backend . richeditor . getTypeInfo event . Returns a menu item type information . The type information is returned as array