WebbuildersGroup\CMSUserDocs\Control\CMSDocumentationViewer
Synopsis
class CMSDocumentationViewer
extends LeftAndMain
{
- // members
- private static string $menu_title = 'Site Help';
- private static integer $menu_priority = 2;
- private static string $url_segment = 'help';
- private static array $allowed_actions = ;
- private static {bool} $append_current_doc_title = true;
- private static {string} $search_engine = false;
- private static {bool} $skip_default_entity = false;
- protected string $entity = '';
- protected DocumentationPage $record;
- protected DocumentationManifest $manifest;
- // methods
- public void init()
- public {string} Title()
- public {SS_HTTPResponse} all()
- public {SS_HTTPResponse} results()
- public {bool} hasAction()
- public {bool} checkAccessAction()
- public {SS_HTTPResponse} handleAction()
- public PjaxResponseNegotiator getResponseNegotiator()
- public {HTMLText} DocContent()
- public {DocumentationManifest} getManifest()
- public {string} getLanguage()
- public {DataObject} getDocsMenu()
- public {HTMLText} getPageContent()
- public {string} replaceChildrenCalls()
- public {string} parseLinksForCMS()
- public void includeChildren()
- public {ArrayList} getChildren()
- public {ArrayList} Breadcrumbs()
- public {DocumentationPage} getPage()
- public {DocumentationEntity} getEntity()
- public {ArrayList} getVersions()
- public void getIsDocViewer()
- public {GroupedList} AllPages()
- public {DocumentationPage} getNextPage()
- public {DocumentationPage} getPreviousPage()
- public {string} getSilverStripeHelpLink()
- public {bool} getHasDefaultEntity()
- public {string} getPagePathTitle()
- public string LinkWithLanguage()
- public {Form} SearchForm()
- public {HTMLText} getSearchResults()
Hierarchy
Extends
- SilverStripe\Admin\LeftAndMain
Members
private
- $allowed_actions
- $append_current_doc_title
—
WebbuildersGroup\CMSUserDocs\Control\{bool}
Whether to append the current documentation path titles to the cms title or not - $search_engine
—
WebbuildersGroup\CMSUserDocs\Control\{string}
Search engine to use for searching documentation this must be an implementor of ICMSUserDocsSearchEngine, if left as false then the search form is not shown - $skip_default_entity
—
WebbuildersGroup\CMSUserDocs\Control\{bool}
Skip the default entity in the title and breadcrumbs - $url_segment
protected
- $entity
—
string
The string name of the currently accessed {@link DocumentationEntity} object. To access the entire object use {@link getEntity()} - $manifest — SilverStripe\DocsViewer\DocumentationManifest
- $record — WebbuildersGroup\CMSUserDocs\Control\DocumentationPage
Methods
public
- AllPages() — Generate a list of all the pages in the documentation grouped by the first letter of the page.
- Breadcrumbs() — Generate a list of breadcrumbs for the user.
- DocContent() — Handles rendering the content panel
- LinkWithLanguage() — Gets the link with the language included
- SearchForm() — Gets the form used for searching
- Title() — Gets the title for this section of the cms
- all() — Handles requests for the documentation index
- checkAccessAction() — Overloaded, it's handled differently
- getChildren()
- getDocsMenu() — Generate a list of {@link Documentation } which have been registered and which can be documented.
- getEntity()
- getHasDefaultEntity() — Gets whether there is a default entity or not
- getIsDocViewer() — Detection if we're in the viewer or not
- getLanguage()
- getManifest()
- getNextPage() — Returns the next page. Either retrieves the sibling of the current page or return the next sibling of the parent page.
- getPage()
- getPageContent() — Return the content for the page. If its an actual documentation page then display the content from the page, otherwise display the contents from the index.md file if its a folder
- getPagePathTitle() — Gets the full path title for the current page
- getPreviousPage() — Returns the previous page. Either returns the previous sibling or the parent of this page
- getResponseNegotiator() — Caution: Volatile API.
- getSearchResults() — Gets the rendered results from searching
- getSilverStripeHelpLink() — Gets the SilverStripe Help Link from the LeftAndMain config
- getVersions()
- handleAction() — Overloaded to avoid "action doesn't exist" errors - all URL parts in this controller are virtual and handled through handleRequest(), not controller methods.
- hasAction() — Overloaded, it's handled differently
- includeChildren() — Short code parser
- init()
- parseLinksForCMS() — Parses the links for use in the cms, routes all absolute links to _blank and uses cms-panel-link for the relative links
- replaceChildrenCalls() — Parses the html to replace the children shortcode with the documentation index
- results() — Handles requests for the documentation search results