You are here

protected function EmailHandler::hasHTMLBody in Easy Email 2.0.x

Same name and namespace in other branches
  1. 8 src/Service/EmailHandler.php \Drupal\easy_email\Service\EmailHandler::hasHTMLBody()

Parameters

\Drupal\easy_email\Entity\EasyEmailInterface $email:

Return value

bool

File

src/Service/EmailHandler.php, line 376

Class

EmailHandler

Namespace

Drupal\easy_email\Service

Code

protected function hasHTMLBody(EasyEmailInterface $email) {
  return $email
    ->hasField('body_html') && !empty($email
    ->getHtmlBody()) && !empty($email
    ->getHtmlBody()['value']);
}