You are here

public function ModalPage::getAllowTags in Modal 8.3

Same name and namespace in other branches
  1. 8.2 src/ModalPage.php \Drupal\modal_page\ModalPage::getAllowTags()

Allowed tags on modal page.

Return value

array Return the tags allowed.

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

File

src/ModalPage.php, line 322

Class

ModalPage
Modal Page Class.

Namespace

Drupal\modal_page

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;
}