You are here

function easy_email_entity_insert in Easy Email 8

Same name and namespace in other branches
  1. 2.0.x easy_email.module \easy_email_entity_insert()

File

./easy_email.module, line 311
Contains easy_email.module.

Code

function easy_email_entity_insert(EntityInterface $entity) {
  if ($entity
    ->getEntityTypeId() == 'easy_email_type' && !\Drupal::isConfigSyncing()) {

    /** @var \Drupal\easy_email\Entity\EasyEmailTypeInterface $entity */
    easy_email_field_add_key_field($entity);
    easy_email_field_add_recipient_uid_field($entity);
    easy_email_field_add_cc_uid_field($entity);
    easy_email_field_add_cc_address_field($entity);
    easy_email_field_add_bcc_uid_field($entity);
    easy_email_field_add_bcc_address_field($entity);
    easy_email_field_add_from_name_field($entity);
    easy_email_field_add_from_address_field($entity);
    easy_email_field_add_reply_to_field($entity);
    easy_email_field_add_html_body_field($entity);
    easy_email_field_add_plain_body_field($entity);
    easy_email_field_add_inbox_preview_field($entity);
    easy_email_field_add_attachment_field($entity);
    easy_email_field_add_attachment_path_field($entity);
  }
}