You are here

public function ModalPageService::getAllowTags in Modal 5.0.x

Same name and namespace in other branches
  1. 4.0.x src/Service/ModalPageService.php \Drupal\modal_page\Service\ModalPageService::getAllowTags()
  2. 4.1.x src/Service/ModalPageService.php \Drupal\modal_page\Service\ModalPageService::getAllowTags()

Allowed tags on modal page.

Return value

array Return the tags allowed.

2 calls to ModalPageService::getAllowTags()
ModalPageService::clearText in src/Service/ModalPageService.php
Apply the filter on text.
ModalPageService::importModalConfigToEntity in src/Service/ModalPageService.php
Import Modal Config to Entity.

File

src/Service/ModalPageService.php, line 352

Class

ModalPageService
Modal Page Service Class.

Namespace

Drupal\modal_page\Service

Code

public function getAllowTags() : array {
  $config = $this->configFactory
    ->get('modal_page.settings');
  $allowed_tags = $config
    ->get('allowed_tags') ?? "h1,h2,a,b,big,code,del,em,i,ins,pre,q,small,span,strong,sub,sup,tt,ol,ul,li,p,br,img";
  $tags = explode(",", $allowed_tags);
  return $tags;
}