HtmlExtension
class HtmlExtension extends AbstractExtension (View source)
HTML functionality Twig extension.
Methods
{@inheritdoc}
{@inheritdoc}
No description
Transforms the given Markdown content into HTML content.
Add 'soft hyphens' to a string, so that it won't break layout in HTML when using strings without spaces or dashes.
Simple redirect to given path
Use relative_path to create a proper link to either a relative page, or to an external source. In the below example, the editor can provide either page/about, or https://boltcms.io, and both will work
Details
array
getFunctions()
{@inheritdoc}
array
getFilters()
{@inheritdoc}
canonical(string|null $route = null, array $params = [])
string
markdown(string $content)
Transforms the given Markdown content into HTML content.
string
shy(string $str)
Add 'soft hyphens' to a string, so that it won't break layout in HTML when using strings without spaces or dashes.
void
redirect(string $path)
Simple redirect to given path
string
absoluteLink(string $link)
Use relative_path to create a proper link to either a relative page, or to an external source. In the below example, the editor can provide either page/about, or https://boltcms.io, and both will work