';
return $svg;
}
public function formatDate($dateString) {
// Create a DateTime object from the input string
$dateTime = new \DateTime($dateString);
// Format the date as required
$formattedDate = $dateTime->format('F, j, Y');
return $formattedDate;
}
public static function allowedHTMLTags(): array
{
$allowedTags = [
'svg' => [
'class' => true,
'aria-hidden' => true,
'aria-labelledby' => true,
'role' => true,
'xmlns' => true,
'width' => true,
'height' => true,
'viewbox' => true,
'fill' => true
],
'g' => [
'fill' => true
],
'title' => ['title' => true],
'path' => [
'd' => true,
'fill' => true,
'stroke' => true
],
];
foreach (['input', 'label', 'img', 'router-view', 'router-link', 'a', 'table', 'thead', 'tbody', 'tr', 'td', 'th', 'div', 'span', 'p', 'select', 'option', 'textarea', 'button', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr'] as $tag) {
$allowedTags[$tag] = [
'type' => [],
'name' => [],
'value' => [],
'src' => [],
'to' => [], // for 'router-link'
'srcset' => [],
'alt' => [],
'href' => [],
'decoding' => [],
'loading' => [],
'height' => [],
'width' => [],
'autocomplete' => [],
'placeholder' => [],
'data-required' => [],
'data-type' => [],
'id' => [],
'class' => [],
'required' => [],
'disabled' => [],
'for' => [],
'style' => [],
'data-id' => [],
'data-template-type' => [],
'data-form-id' => [],
'data-adrm-form-id' => [],
];
}
return $allowedTags;
}
}