mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix comments
This commit is contained in:
parent
03b94c05b8
commit
11e6efee68
@ -24,7 +24,13 @@ use Symfony\Component\Form\FormView;
|
|||||||
use Symfony\Component\Form\FormInterface;
|
use Symfony\Component\Form\FormInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Create a Textarea
|
||||||
*
|
*
|
||||||
|
* By default, add a WYSIWYG editor.
|
||||||
|
*
|
||||||
|
* Options:
|
||||||
|
*
|
||||||
|
* * `disable_editor`: set true to disable editor
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
final class ChillTextareaType extends AbstractType
|
final class ChillTextareaType extends AbstractType
|
||||||
|
@ -29,7 +29,6 @@ use Parsedown;
|
|||||||
final class ChillMarkdownRenderExtension extends AbstractExtension
|
final class ChillMarkdownRenderExtension extends AbstractExtension
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @var Parsedown
|
* @var Parsedown
|
||||||
*/
|
*/
|
||||||
protected $parsedown;
|
protected $parsedown;
|
||||||
@ -40,7 +39,7 @@ final class ChillMarkdownRenderExtension extends AbstractExtension
|
|||||||
$this->parsedown->setSafeMode(true);
|
$this->parsedown->setSafeMode(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilters()
|
public function getFilters(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
new TwigFilter('chill_markdown_to_html', [$this, 'renderMarkdownToHtml'], [
|
new TwigFilter('chill_markdown_to_html', [$this, 'renderMarkdownToHtml'], [
|
||||||
@ -49,7 +48,7 @@ final class ChillMarkdownRenderExtension extends AbstractExtension
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function renderMarkdownToHtml($var)
|
public function renderMarkdownToHtml(string $var): string
|
||||||
{
|
{
|
||||||
return $this->parsedown->parse($var);
|
return $this->parsedown->parse($var);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user