UndefinedOffset\Markdown\Model\FieldTypes\DBMarkdown
Class Markdown
Synopsis
class DBMarkdown
extends DBText
{
- // members
- private $cache_key;
- private static integer $cache_seconds = 86400;
- private static array $casting = ;
- private static string $escape_type = 'xml';
- private static string $renderer = GithubMarkdownRenderer::class;
- private IMarkdownRenderer $renderInst;
- protected boolean $parsedHTML = false;
- // methods
- public string AsHTML()
- public string forTemplate()
- public static void setRenderer()
- private IMarkdownRenderer getRenderer()
- public string getCacheKey()
- public $this setCacheKey()
Hierarchy
Extends
- SilverStripe\ORM\FieldType\DBText
Members
private
- $cache_key — string
- $cache_seconds — int
-
$casting
{@inheritDoc} - $escape_type — string
- $renderInst — UndefinedOffset\Markdown\Renderer\IMarkdownRenderer
- $renderer — string
protected
- $parsedHTML — string
Methods
private
- getRenderer() — Gets the active markdown renderer
public
- AsHTML() — Checks cache to see if the contents of this field have already been loaded from github, if they haven't then a request is made to the github api to render the markdown
- forTemplate() — Renders the field used in the template
- getCacheKey()
- setCacheKey()
- setRenderer() — Sets the renderer for markdown fields to use