Markdown
class Markdown (View source)
Properties
protected Factory | $view | The view factory implementation. |
|
protected string | $theme | The current theme being used when generating emails. |
|
protected array | $componentPaths | The registered component paths. |
Methods
void
render(string $view, array $data = [], CssToInlineStyles|null $inliner = null)
Render the Markdown template into HTML.
renderText(string $view, array $data = [])
Render the Markdown template into text.
static HtmlString
parse(string $text)
Parse the given Markdown text into HTML.
array
htmlComponentPaths()
Get the HTML component paths.
array
textComponentPaths()
Get the text component paths.
array
componentPaths()
Get the component paths.
void
loadComponentsFrom(array $paths = [])
Register new mail component paths.
$this
theme(string $theme)
Set the default theme to be used.
Details
void
__construct(Factory $view, array $options = [])
Create a new Markdown renderer instance.
HtmlString
render(string $view, array $data = [], CssToInlineStyles|null $inliner = null)
Render the Markdown template into HTML.
HtmlString
renderText(string $view, array $data = [])
Render the Markdown template into text.
static HtmlString
parse(string $text)
Parse the given Markdown text into HTML.
array
htmlComponentPaths()
Get the HTML component paths.
array
textComponentPaths()
Get the text component paths.
protected array
componentPaths()
Get the component paths.
void
loadComponentsFrom(array $paths = [])
Register new mail component paths.
$this
theme(string $theme)
Set the default theme to be used.