Function Hook_health_check_email->html_to_plain_text

Definitions

sources/hooks/systems/health_checks/email.php

  • Normalise some HTML text into plain-text which would typically match plain-text e-mails.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$html LONG_TEXT No No required parameter N/A N/A The HTML to normalise

Returns

  • The plain-text and normalised version of the HTML (null: error)
  • Type: ?string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Normalise some HTML text into plain-text which would typically match plain-text e-mails.
 *
 * @param  LONG_TEXT $html The HTML to normalise
 * @return ?string The plain-text and normalised version of the HTML (null: error)
 */

protected function html_to_plain_text(string $html) : ?string