. */ declare(strict_types=1); namespace App\DataTables\Column; use App\Services\Formatters\MarkdownParser; use Omines\DataTablesBundle\Column\AbstractColumn; class MarkdownColumn extends AbstractColumn { public function __construct(protected MarkdownParser $markdown) { } /** * The normalize function is responsible for converting parsed and processed data to a datatables-appropriate type. * * @param mixed $value The single value of the column * @return mixed */ public function normalize($value) { return $this->markdown->markForRendering($value, true); } }