You are here

protected function MinifyHTMLExit::minifyPlaceholderReplace in Minify Source HTML 8

Helper function to add tag key and value for further replacement.

Parameters

string $content: String before the placeholder replacement.

Return value

string The placeholder string.

5 calls to MinifyHTMLExit::minifyPlaceholderReplace()
MinifyHTMLExit::minifyhtmlPlaceholderCallbackIframe in src/EventSubscriber/MinifyHTMLExit.php
Helper function to add place holder for <iframe> tag.
MinifyHTMLExit::minifyhtmlPlaceholderCallbackPre in src/EventSubscriber/MinifyHTMLExit.php
Helper function to add place holder for <pre> tag.
MinifyHTMLExit::minifyhtmlPlaceholderCallbackScript in src/EventSubscriber/MinifyHTMLExit.php
Helper function to add place holder for <script> tag.
MinifyHTMLExit::minifyhtmlPlaceholderCallbackStyle in src/EventSubscriber/MinifyHTMLExit.php
Helper function to add place holder for <style> tag.
MinifyHTMLExit::minifyhtmlPlaceholderCallbackTextarea in src/EventSubscriber/MinifyHTMLExit.php
Helper function to add place holder for <textarea> tag.

File

src/EventSubscriber/MinifyHTMLExit.php, line 304

Class

MinifyHTMLExit
Minifies the HTML of the response.

Namespace

Drupal\minifyhtml\EventSubscriber

Code

protected function minifyPlaceholderReplace($content) {
  $placeholder = '%' . $this->token . count($this->placeholders) . '%';
  $this->placeholders[$placeholder] = $content;
  return $placeholder;
}