You are here

function Email::isEmpty in Courier 8

Same name and namespace in other branches
  1. 2.x src/Entity/Email.php \Drupal\courier\Entity\Email::isEmpty()

Determine if there is enough data to transmit a message.

Ideally some validation should also be done on the entity form.

Return value

bool

Overrides ChannelInterface::isEmpty

File

src/Entity/Email.php, line 135
Contains \Drupal\courier\Entity\Email.

Class

Email
Defines storage for a composed email.

Namespace

Drupal\courier\Entity

Code

function isEmpty() {
  return empty($this
    ->getBody()) || empty($this
    ->getSubject());
}