You are here

class EasyEmail in Easy Email 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/EasyEmail.php \Drupal\easy_email\Entity\EasyEmail

Defines the Email entity.

Plugin annotation


@ContentEntityType(
  id = "easy_email",
  label = @Translation("Email"),
  bundle_label = @Translation("Email Template"),
  label_collection = @Translation("Email Log"),
  handlers = {
    "event" = "Drupal\easy_email\Event\EasyEmailEvent",
    "storage" = "Drupal\easy_email\EasyEmailStorage",
    "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
    "list_builder" = "Drupal\easy_email\EasyEmailListBuilder",
    "views_data" = "Drupal\easy_email\Entity\EasyEmailViewsData",
    "translation" = "Drupal\easy_email\EasyEmailTranslationHandler",

    "form" = {
      "default" = "Drupal\easy_email\Form\EasyEmailForm",
      "add" = "Drupal\easy_email\Form\EasyEmailForm",
      "edit" = "Drupal\easy_email\Form\EasyEmailForm",
      "delete" = "Drupal\easy_email\Form\EasyEmailDeleteForm",
    },
    "access" = "Drupal\easy_email\EasyEmailAccessControlHandler",
    "route_provider" = {
      "html" = "Drupal\easy_email\EasyEmailHtmlRouteProvider",
    },
  },
  base_table = "easy_email",
  data_table = "easy_email_field_data",
  revision_table = "easy_email_revision",
  revision_data_table = "easy_email_field_revision",
  translatable = TRUE,
  admin_permission = "administer email entities",
  entity_keys = {
    "id" = "id",
    "revision" = "vid",
    "bundle" = "type",
    "label" = "id",
    "uuid" = "uuid",
    "uid" = "creator_uid",
    "langcode" = "langcode",
    "status" = "status",
  },
  revision_metadata_keys = {
    "revision_default" = "revision_default",
    "revision_user" = "revision_user",
    "revision_created" = "revision_created",
    "revision_log_message" = "revision_log_message",
  },
  links = {
    "canonical" = "/admin/content/email/{easy_email}",
    "preview" = "/admin/content/email/{easy_email}/preview",
    "preview_plain" = "/admin/content/email/{easy_email}/preview-plain",
    "add-page" = "/admin/content/email/add",
    "add-form" = "/admin/content/email/add/{easy_email_type}",
    "edit-form" = "/admin/content/email/{easy_email}/edit",
    "delete-form" = "/admin/content/email/{easy_email}/delete",
    "version-history" = "/admin/content/email/{easy_email}/revisions",
    "revision" = "/admin/content/email/{easy_email}/revisions/{easy_email_revision}/view",
    "revision_revert" = "/admin/content/email/{easy_email}/revisions/{easy_email_revision}/revert",
    "revision_delete" = "/admin/content/email/{easy_email}/revisions/{easy_email_revision}/delete",
    "translation_revert" = "/admin/content/email/{easy_email}/revisions/{easy_email_revision}/revert/{langcode}",
    "collection" = "/admin/content/email",
  },
  bundle_entity_type = "easy_email_type",
  field_ui_base_route = "entity.easy_email_type.edit_form"
)

Hierarchy

Expanded class hierarchy of EasyEmail

File

src/Entity/EasyEmail.php, line 83

Namespace

Drupal\easy_email\Entity
View source
class EasyEmail extends RevisionableContentEntityBase implements EasyEmailInterface {
  use EntityChangedTrait;

  /**
   * @var array
   */
  protected $evaluatedAttachments;

  /**
   * {@inheritdoc}
   */
  public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {

    /** @var \Drupal\easy_email\EasyEmailStorageInterface $storage_controller */
    parent::preCreate($storage_controller, $values);

    /** @var \Drupal\easy_email\Entity\EasyEmailTypeInterface $easy_email_type */
    $easy_email_type = $storage_controller
      ->getEmailTypeStorage()
      ->load($values['type']);
    $values += [
      'creator_uid' => \Drupal::currentUser()
        ->id(),
      'key' => $easy_email_type
        ->getKey(),
      'from_name' => $easy_email_type
        ->getFromName(),
      'from_address' => $easy_email_type
        ->getFromAddress(),
      'reply_to' => $easy_email_type
        ->getReplyToAddress(),
      'subject' => $easy_email_type
        ->getSubject(),
      'body_html' => $easy_email_type
        ->getBodyHtml(),
      'body_plain' => $easy_email_type
        ->getBodyPlain(),
      'inbox_preview' => $easy_email_type
        ->getInboxPreview(),
      'recipient_address' => $easy_email_type
        ->getRecipient(),
      'cc_address' => $easy_email_type
        ->getCc(),
      'bcc_address' => $easy_email_type
        ->getBcc(),
      'attachment_path' => $easy_email_type
        ->getAttachment(),
    ];
  }

  /**
   * {@inheritdoc}
   */
  protected function urlRouteParameters($rel) {
    $uri_route_parameters = parent::urlRouteParameters($rel);
    if ($rel === 'revision_revert' && $this instanceof RevisionableInterface) {
      $uri_route_parameters[$this
        ->getEntityTypeId() . '_revision'] = $this
        ->getRevisionId();
    }
    elseif ($rel === 'revision_delete' && $this instanceof RevisionableInterface) {
      $uri_route_parameters[$this
        ->getEntityTypeId() . '_revision'] = $this
        ->getRevisionId();
    }
    return $uri_route_parameters;
  }

  /**
   * {@inheritdoc}
   */
  public function preSave(EntityStorageInterface $storage) {
    parent::preSave($storage);
    foreach (array_keys($this
      ->getTranslationLanguages()) as $langcode) {
      $translation = $this
        ->getTranslation($langcode);

      // If no owner has been set explicitly, make the anonymous user the owner.
      if (!$translation
        ->getCreator()) {
        $translation
          ->setCreatorId(0);
      }
    }

    // If no revision author has been set explicitly, make the easy_email owner the
    // revision author.
    if (!$this
      ->getRevisionUser()) {
      $this
        ->setRevisionUserId($this
        ->getCreatorId());
    }
  }

  /**
   * {@inheritdoc}
   */
  public function getCreatedTime() {
    return $this
      ->get('created')->value;
  }

  /**
   * {@inheritdoc}
   */
  public function setCreatedTime($timestamp) {
    $this
      ->set('created', $timestamp);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getCreator() {
    return $this
      ->get('creator_uid')->entity;
  }

  /**
   * {@inheritdoc}
   */
  public function getCreatorId() {
    return $this
      ->get('creator_uid')->target_id;
  }

  /**
   * {@inheritdoc}
   */
  public function setCreatorId($uid) {
    $this
      ->set('creator_uid', $uid);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setCreator(UserInterface $account) {
    $this
      ->set('creator_uid', $account
      ->id());
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getKey() {
    return $this
      ->get('key')->value;
  }

  /**
   * @inheritDoc
   */
  public function setKey($key) {
    $this
      ->set('key', $key);
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getRecipients() {
    if ($this
      ->hasField('recipient_uid')) {
      return $this
        ->get('recipient_uid')
        ->referencedEntities();
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setRecipients($accounts) {
    if ($this
      ->hasField('recipient_uid')) {
      $this
        ->set('recipient_uid', $accounts);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getRecipientIds() {
    if ($this
      ->hasField('recipient_uid')) {
      return $this
        ->getEntityReferenceIds($this
        ->get('recipient_uid'));
    }
    return [];
  }

  /**
   * @inheritDoc
   */
  public function setRecipientIds($uids) {
    if ($this
      ->hasField('recipient_uid')) {
      $this
        ->set('recipient_uid', $uids);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addRecipient($uid) {
    if ($this
      ->hasField('recipient_uid')) {
      return $this
        ->addEntityReferenceById($uid, 'recipient_uid');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeRecipient($uid) {
    if ($this
      ->hasField('recipient_uid')) {
      return $this
        ->removeEntityReferenceById($uid, 'recipient_uid');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getRecipientAddresses() {
    return $this
      ->getListTextValues($this
      ->get('recipient_address'));
  }

  /**
   * @inheritDoc
   */
  public function setRecipientAddresses($addresses) {
    $this
      ->set('recipient_address', $addresses);
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addRecipientAddress($address) {
    return $this
      ->addTextValueToList($address, 'recipient_address');
  }

  /**
   * @inheritDoc
   */
  public function removeRecipientAddress($address) {
    return $this
      ->removeTextValueFromList($address, 'recipient_address');
  }

  /**
   * @inheritDoc
   */
  public function getCC() {
    if ($this
      ->hasField('cc_uid')) {
      return $this
        ->get('cc_uid')
        ->referencedEntities();
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setCC($accounts) {
    if ($this
      ->hasField('cc_uid')) {
      $this
        ->set('cc_uid', $accounts);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getCCIds() {
    if ($this
      ->hasField('cc_uid')) {
      return $this
        ->getEntityReferenceIds($this
        ->get('cc_uid'));
    }
    return [];
  }

  /**
   * @inheritDoc
   */
  public function setCCIds($uids) {
    if ($this
      ->hasField('cc_uid')) {
      $this
        ->set('cc_uid', $uids);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addCC($uid) {
    if ($this
      ->hasField('cc_uid')) {
      return $this
        ->addEntityReferenceById($uid, 'cc_uid');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeCC($uid) {
    if ($this
      ->hasField('cc_uid')) {
      return $this
        ->removeEntityReferenceById($uid, 'cc_uid');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getCCAddresses() {
    if ($this
      ->hasField('cc_address')) {
      return $this
        ->getListTextValues($this
        ->get('cc_address'));
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setCCAddresses($addresses) {
    if ($this
      ->hasField('cc_address')) {
      $this
        ->set('cc_address', $addresses);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addCCAddress($address) {
    if ($this
      ->hasField('cc_address')) {
      return $this
        ->addTextValueToList($address, 'cc_address');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeCCAddress($address) {
    if ($this
      ->hasField('cc_address')) {
      return $this
        ->removeTextValueFromList($address, 'cc_address');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getBCC() {
    if ($this
      ->hasField('bcc_uid')) {
      return $this
        ->get('bcc_uid')
        ->referencedEntities();
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setBCC($accounts) {
    if ($this
      ->hasField('bcc_uid')) {
      $this
        ->set('bcc_uid', $accounts);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getBCCIds() {
    if ($this
      ->hasField('bcc_uid')) {
      return $this
        ->getEntityReferenceIds($this
        ->get('bcc_uid'));
    }
    return [];
  }

  /**
   * @inheritDoc
   */
  public function setBCCIds($uids) {
    if ($this
      ->hasField('bcc_uid')) {
      $this
        ->set('bcc_uid', $uids);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addBCC($uid) {
    if ($this
      ->hasField('bcc_uid')) {
      return $this
        ->addEntityReferenceById($uid, 'bcc_uid');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeBCC($uid) {
    if ($this
      ->hasField('bcc_uid')) {
      return $this
        ->removeEntityReferenceById($uid, 'bcc_uid');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getBCCAddresses() {
    if ($this
      ->hasField('bcc_address')) {
      return $this
        ->getListTextValues($this
        ->get('bcc_address'));
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setBCCAddresses($addresses) {
    if ($this
      ->hasField('bcc_address')) {
      $this
        ->set('bcc_address', $addresses);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addBCCAddress($address) {
    if ($this
      ->hasField('bcc_address')) {
      return $this
        ->addTextValueToList($address, 'bcc_address');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeBCCAddress($address) {
    if ($this
      ->hasField('bcc_address')) {
      return $this
        ->removeTextValueFromList($address, 'bcc_address');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getFromName() {
    if ($this
      ->hasField('from_name')) {
      return $this
        ->get('from_name')->value;
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setFromName($from_name) {
    if ($this
      ->hasField('from_name')) {
      $this
        ->set('from_name', $from_name);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getFromAddress() {
    if ($this
      ->hasField('from_address')) {
      return $this
        ->get('from_address')->value;
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setFromAddress($from_email) {
    if ($this
      ->hasField('from_address')) {
      $this
        ->set('from_address', $from_email);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getReplyToAddress() {
    if ($this
      ->hasField('reply_to')) {
      return $this
        ->get('reply_to')->value;
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setReplyToAddress($reply_to_email) {
    if ($this
      ->hasField('reply_to')) {
      $this
        ->set('reply_to', $reply_to_email);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getSubject() {
    return $this
      ->get('subject')->value;
  }

  /**
   * @inheritDoc
   */
  public function setSubject($subject) {
    $this
      ->set('subject', $subject);
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getInboxPreview() {
    if ($this
      ->hasField('inbox_preview')) {
      return $this
        ->get('inbox_preview')->value;
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setInboxPreview($text) {
    if ($this
      ->hasField('inbox_preview')) {
      $this
        ->set('inbox_preview', $text);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getHtmlBody() {
    if ($this
      ->hasField('body_html')) {
      return [
        'value' => $this
          ->get('body_html')->value,
        'format' => $this
          ->get('body_html')->format,
      ];
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setHtmlBody($text, $format) {
    if ($this
      ->hasField('body_html')) {
      $this
        ->set('body_html', [
        'value' => $text,
        'format' => $format,
      ]);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getPlainBody() {
    if ($this
      ->hasField('body_plain')) {
      return $this
        ->get('body_plain')->value;
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setPlainBody($text) {
    if ($this
      ->hasField('body_plain')) {
      $this
        ->set('body_plain', $text);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getAttachments() {
    if ($this
      ->hasField('attachment')) {
      return $this
        ->get('attachment')
        ->referencedEntities();
    }
    return [];
  }

  /**
   * @inheritDoc
   */
  public function setAttachments($files) {
    if ($this
      ->hasField('attachment')) {
      $this
        ->set('attachment', $files);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getAttachmentIds() {
    if ($this
      ->hasField('attachment')) {
      return $this
        ->getEntityReferenceIds($this
        ->get('attachment'));
    }
    return [];
  }

  /**
   * @inheritDoc
   */
  public function setAttachmentIds($fids) {
    if ($this
      ->hasField('attachment')) {
      $this
        ->set('attachment', $fids);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addAttachment($fid) {
    if ($this
      ->hasField('attachment')) {
      return $this
        ->addEntityReferenceById($fid, 'attachment');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeAttachment($fid) {
    if ($this
      ->hasField('attachment')) {
      return $this
        ->removeEntityReferenceById($fid, 'attachment');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getAttachmentPaths() {
    if ($this
      ->hasField('attachment_path')) {
      return $this
        ->getListTextValues($this
        ->get('attachment_path'));
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function setAttachmentPaths($paths) {
    if ($this
      ->hasField('attachment_path')) {
      $this
        ->set('attachment_path', $paths);
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addAttachmentPath($path) {
    if ($this
      ->hasField('attachment_path')) {
      return $this
        ->addTextValueToList($path, 'attachment_path');
    }
    return NULL;
  }

  /**
   * @inheritDoc
   */
  public function removeAttachmentPath($path) {
    if ($this
      ->hasField('attachment_path')) {
      return $this
        ->removeTextValueFromList($path, 'attachment_path');
    }
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function getEvaluatedAttachments() {
    if (is_null($this->evaluatedAttachments)) {
      $this->evaluatedAttachments = [];
    }
    return $this->evaluatedAttachments;
  }

  /**
   * @inheritDoc
   */
  public function setEvaluatedAttachments($attachments) {
    $this->evaluatedAttachments = $attachments;
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function addEvaluatedAttachment($attachment) {
    $existing_attachments = $this
      ->getEvaluatedAttachments();
    foreach ($existing_attachments as $existing_attachment) {
      if ($existing_attachment->uri === $attachment->uri) {
        return $this;
      }
    }
    $this->evaluatedAttachments[] = $attachment;
    return $this;
  }

  /**
   * @inheritDoc
   */
  public function removeEvaluatedAttachment($attachment) {
    $existing_attachments = $this
      ->getEvaluatedAttachments();
    foreach ($existing_attachments as $i => $existing_attachment) {
      if ($existing_attachment->uri === $attachment->uri) {
        unset($existing_attachments[$i]);
      }
    }
    $this->evaluatedAttachments = array_values($existing_attachments);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function isSent() {
    return (bool) $this
      ->get('sent')->value;
  }

  /**
   * {@inheritdoc}
   */
  public function getSentTime() {
    return $this
      ->get('sent')->value;
  }

  /**
   * {@inheritdoc}
   */
  public function setSentTime($timestamp) {
    $this
      ->set('sent', $timestamp);
    return $this;
  }

  /**
   * @param \Drupal\Core\Field\EntityReferenceFieldItemList $field_item_list
   *
   * @return int[]
   *   The entity IDs
   */
  protected function getEntityReferenceIds($field_item_list) {
    $ids = [];
    if (!$field_item_list
      ->isEmpty()) {
      foreach ($field_item_list as $delta => $item) {
        if ($item->target_id !== NULL) {
          $ids[$delta] = $item->target_id;
        }
      }
    }
    return $ids;
  }

  /**
   * Add an entity by ID to the an entity reference field item list.
   *
   * @param int $id
   * @param string $field_name
   *
   * @return $this
   */
  protected function addEntityReferenceById($id, $field_name) {
    $ids = $this
      ->getEntityReferenceIds($this
      ->get($field_name));
    if (!is_null($ids) && !in_array($id, $ids)) {
      $ids[] = $id;
      $this
        ->set($field_name, $ids);
    }
    return $this;
  }

  /**
   *  Remove an entity by ID to the an entity reference field item list.
   *
   * @param int $id
   * @param string $field_name
   *
   * @return $this
   */
  protected function removeEntityReferenceById($id, $field_name) {
    $ids = $this
      ->getEntityReferenceIds($this
      ->get($field_name));
    if (!is_null($ids)) {
      foreach ($ids as $delta => $value) {
        if ($id === $value) {
          unset($ids[$delta]);
        }
      }
      $this
        ->set($field_name, $ids);
    }
    return $this;
  }

  /**
   * @param \Drupal\Core\Field\FieldItemList $field_item_list
   *
   * @return string[]|null
   *   The string values from the field list
   */
  protected function getListTextValues($field_item_list) {
    if (!$field_item_list
      ->isEmpty()) {
      $values = [];
      foreach ($field_item_list as $delta => $item) {
        if ($item->value !== NULL) {
          $values[$delta] = $item->value;
        }
      }
      return $values;
    }
    return NULL;
  }

  /**
   * Add an entity by ID to the an entity reference field item list.
   *
   * @param string $text
   * @param string $field_name
   *
   * @return $this
   */
  protected function addTextValueToList($text, $field_name) {
    $strings = $this
      ->getListTextValues($this
      ->get($field_name));
    if (!is_null($strings) && !in_array($text, $strings)) {
      $strings[] = $text;
      $this
        ->set($field_name, $strings);
    }
    return $this;
  }

  /**
   *  Remove an entity by ID to the an entity reference field item list.
   *
   * @param string $text
   * @param string $field_name
   *
   * @return $this
   */
  protected function removeTextValueFromList($text, $field_name) {
    $strings = $this
      ->getListTextValues($this
      ->get($field_name));
    if (!is_null($strings)) {
      foreach ($strings as $delta => $value) {
        if ($text === $value) {
          unset($strings[$delta]);
        }
      }
      $this
        ->set($field_name, $strings);
    }
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    $fields = parent::baseFieldDefinitions($entity_type);
    $fields['creator_uid'] = BaseFieldDefinition::create('entity_reference')
      ->setLabel(t('Creator'))
      ->setDescription(t('The user ID of creator of the Email entity.'))
      ->setRevisionable(TRUE)
      ->setSetting('target_type', 'user')
      ->setSetting('handler', 'default')
      ->setTranslatable(TRUE)
      ->setDisplayOptions('view', [
      'label' => 'hidden',
      'type' => 'author',
      'weight' => 0,
    ])
      ->setDisplayOptions('form', [
      'type' => 'entity_reference_autocomplete',
      'weight' => 5,
      'settings' => [
        'match_operator' => 'CONTAINS',
        'size' => '60',
        'autocomplete_type' => 'tags',
        'placeholder' => '',
      ],
    ])
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
    $fields['recipient_address'] = BaseFieldDefinition::create('string')
      ->setLabel(t('Recipient Addresses'))
      ->setDescription(t('The recipient email addresses of the Email entity.'))
      ->setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)
      ->setRevisionable(TRUE)
      ->setSettings([
      'max_length' => 255,
      'text_processing' => 0,
    ])
      ->setDefaultValue('')
      ->setDisplayOptions('view', [
      'label' => 'above',
      'type' => 'string',
      'weight' => -4,
    ])
      ->setDisplayOptions('form', [
      'type' => 'string_textfield',
      'weight' => -4,
    ])
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
    $fields['subject'] = BaseFieldDefinition::create('string')
      ->setLabel(t('Subject'))
      ->setDescription(t('The Subject of the Email entity.'))
      ->setRevisionable(TRUE)
      ->setTranslatable(TRUE)
      ->setSettings([
      'max_length' => 255,
      'text_processing' => 0,
    ])
      ->setDefaultValue('')
      ->setDisplayOptions('view', [
      'label' => 'above',
      'type' => 'string',
      'weight' => -4,
    ])
      ->setDisplayOptions('form', [
      'type' => 'string_textfield',
      'weight' => -4,
    ])
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
    $fields['created'] = BaseFieldDefinition::create('created')
      ->setLabel(t('Created'))
      ->setDescription(t('The time that the entity was created.'));
    $fields['changed'] = BaseFieldDefinition::create('changed')
      ->setLabel(t('Changed'))
      ->setDescription(t('The time that the entity was last edited.'));
    $fields['sent'] = BaseFieldDefinition::create('timestamp')
      ->setLabel(t('Sent'))
      ->setDescription(t('The time that the entity was sent.'));
    $fields['revision_translation_affected'] = BaseFieldDefinition::create('boolean')
      ->setLabel(t('Revision translation affected'))
      ->setDescription(t('Indicates if the last edit of a translation belongs to current revision.'))
      ->setReadOnly(TRUE)
      ->setRevisionable(TRUE)
      ->setTranslatable(TRUE);
    return $fields;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
ContentEntityBase::$activeLangcode protected property Language code identifying the entity active language.
ContentEntityBase::$defaultLangcode protected property Local cache for the default language code.
ContentEntityBase::$defaultLangcodeKey protected property The default langcode entity key.
ContentEntityBase::$enforceRevisionTranslationAffected protected property Whether the revision translation affected flag has been enforced.
ContentEntityBase::$entityKeys protected property Holds untranslatable entity keys such as the ID, bundle, and revision ID.
ContentEntityBase::$fieldDefinitions protected property Local cache for field definitions.
ContentEntityBase::$fields protected property The array of fields, each being an instance of FieldItemListInterface.
ContentEntityBase::$fieldsToSkipFromTranslationChangesCheck protected static property Local cache for fields to skip from the checking for translation changes.
ContentEntityBase::$isDefaultRevision protected property Indicates whether this is the default revision.
ContentEntityBase::$langcodeKey protected property The language entity key.
ContentEntityBase::$languages protected property Local cache for the available language objects.
ContentEntityBase::$loadedRevisionId protected property The loaded revision ID before the new revision was set.
ContentEntityBase::$newRevision protected property Boolean indicating whether a new revision should be created on save.
ContentEntityBase::$revisionTranslationAffectedKey protected property The revision translation affected entity key.
ContentEntityBase::$translatableEntityKeys protected property Holds translatable entity keys such as the label.
ContentEntityBase::$translationInitialize protected property A flag indicating whether a translation object is being initialized.
ContentEntityBase::$translations protected property An array of entity translation metadata.
ContentEntityBase::$validated protected property Whether entity validation was performed.
ContentEntityBase::$validationRequired protected property Whether entity validation is required before saving the entity.
ContentEntityBase::$values protected property The plain data values of the contained fields.
ContentEntityBase::access public function Checks data value access. Overrides EntityBase::access 1
ContentEntityBase::addTranslation public function Adds a new translation to the translatable object. Overrides TranslatableInterface::addTranslation
ContentEntityBase::bundle public function Gets the bundle of the entity. Overrides EntityBase::bundle
ContentEntityBase::bundleFieldDefinitions public static function Provides field definitions for a specific bundle. Overrides FieldableEntityInterface::bundleFieldDefinitions 4
ContentEntityBase::clearTranslationCache protected function Clear entity translation object cache to remove stale references.
ContentEntityBase::createDuplicate public function Creates a duplicate of the entity. Overrides EntityBase::createDuplicate 1
ContentEntityBase::get public function Gets a field item list. Overrides FieldableEntityInterface::get
ContentEntityBase::getEntityKey protected function Gets the value of the given entity key, if defined. 1
ContentEntityBase::getFieldDefinition public function Gets the definition of a contained field. Overrides FieldableEntityInterface::getFieldDefinition
ContentEntityBase::getFieldDefinitions public function Gets an array of field definitions of all contained fields. Overrides FieldableEntityInterface::getFieldDefinitions
ContentEntityBase::getFields public function Gets an array of all field item lists. Overrides FieldableEntityInterface::getFields
ContentEntityBase::getFieldsToSkipFromTranslationChangesCheck protected function Returns an array of field names to skip in ::hasTranslationChanges. 1
ContentEntityBase::getIterator public function
ContentEntityBase::getLanguages protected function
ContentEntityBase::getLoadedRevisionId public function Gets the loaded Revision ID of the entity. Overrides RevisionableInterface::getLoadedRevisionId
ContentEntityBase::getRevisionId public function Gets the revision identifier of the entity. Overrides RevisionableInterface::getRevisionId
ContentEntityBase::getTranslatableFields public function Gets an array of field item lists for translatable fields. Overrides FieldableEntityInterface::getTranslatableFields
ContentEntityBase::getTranslatedField protected function Gets a translated field.
ContentEntityBase::getTranslation public function Gets a translation of the data. Overrides TranslatableInterface::getTranslation
ContentEntityBase::getTranslationLanguages public function Returns the languages the data is translated to. Overrides TranslatableInterface::getTranslationLanguages
ContentEntityBase::getTranslationStatus public function Returns the translation status. Overrides TranslationStatusInterface::getTranslationStatus
ContentEntityBase::getUntranslated public function Returns the translatable object referring to the original language. Overrides TranslatableInterface::getUntranslated
ContentEntityBase::hasField public function Determines whether the entity has a field with the given name. Overrides FieldableEntityInterface::hasField
ContentEntityBase::hasTranslation public function Checks there is a translation for the given language code. Overrides TranslatableInterface::hasTranslation
ContentEntityBase::hasTranslationChanges public function Determines if the current translation of the entity has unsaved changes. Overrides TranslatableInterface::hasTranslationChanges
ContentEntityBase::id public function Gets the identifier. Overrides EntityBase::id
ContentEntityBase::initializeTranslation protected function Instantiates a translation object for an existing translation.
ContentEntityBase::isDefaultRevision public function Checks if this entity is the default revision. Overrides RevisionableInterface::isDefaultRevision
ContentEntityBase::isDefaultTranslation public function Checks whether the translation is the default one. Overrides TranslatableInterface::isDefaultTranslation
ContentEntityBase::isDefaultTranslationAffectedOnly public function Checks if untranslatable fields should affect only the default translation. Overrides TranslatableRevisionableInterface::isDefaultTranslationAffectedOnly
ContentEntityBase::isLatestRevision public function Checks if this entity is the latest revision. Overrides RevisionableInterface::isLatestRevision
ContentEntityBase::isLatestTranslationAffectedRevision public function Checks whether this is the latest revision affecting this translation. Overrides TranslatableRevisionableInterface::isLatestTranslationAffectedRevision
ContentEntityBase::isNewRevision public function Determines whether a new revision should be created on save. Overrides RevisionableInterface::isNewRevision
ContentEntityBase::isNewTranslation public function Checks whether the translation is new. Overrides TranslatableInterface::isNewTranslation
ContentEntityBase::isRevisionTranslationAffected public function Checks whether the current translation is affected by the current revision. Overrides TranslatableRevisionableInterface::isRevisionTranslationAffected
ContentEntityBase::isRevisionTranslationAffectedEnforced public function Checks if the revision translation affected flag value has been enforced. Overrides TranslatableRevisionableInterface::isRevisionTranslationAffectedEnforced
ContentEntityBase::isTranslatable public function Returns the translation support status. Overrides TranslatableInterface::isTranslatable
ContentEntityBase::isValidationRequired public function Checks whether entity validation is required before saving the entity. Overrides FieldableEntityInterface::isValidationRequired
ContentEntityBase::label public function Gets the label of the entity. Overrides EntityBase::label 2
ContentEntityBase::language public function Gets the language of the entity. Overrides EntityBase::language
ContentEntityBase::onChange public function Reacts to changes to a field. Overrides FieldableEntityInterface::onChange
ContentEntityBase::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityBase::postCreate
ContentEntityBase::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides EntityBase::postSave 5
ContentEntityBase::preSaveRevision public function Acts on a revision before it gets saved. Overrides RevisionableInterface::preSaveRevision 2
ContentEntityBase::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityBase::referencedEntities 1
ContentEntityBase::removeTranslation public function Removes the translation identified by the given language code. Overrides TranslatableInterface::removeTranslation
ContentEntityBase::set public function Sets a field value. Overrides FieldableEntityInterface::set
ContentEntityBase::setDefaultLangcode protected function Populates the local cache for the default language code.
ContentEntityBase::setNewRevision public function Enforces an entity to be saved as a new revision. Overrides RevisionableInterface::setNewRevision
ContentEntityBase::setRevisionTranslationAffected public function Marks the current revision translation as affected. Overrides TranslatableRevisionableInterface::setRevisionTranslationAffected
ContentEntityBase::setRevisionTranslationAffectedEnforced public function Enforces the revision translation affected flag value. Overrides TranslatableRevisionableInterface::setRevisionTranslationAffectedEnforced
ContentEntityBase::setValidationRequired public function Sets whether entity validation is required before saving the entity. Overrides FieldableEntityInterface::setValidationRequired
ContentEntityBase::toArray public function Gets an array of all property values. Overrides EntityBase::toArray
ContentEntityBase::updateFieldLangcodes protected function Updates language for already instantiated fields.
ContentEntityBase::updateLoadedRevisionId public function Updates the loaded Revision ID with the revision ID. Overrides RevisionableInterface::updateLoadedRevisionId
ContentEntityBase::updateOriginalValues public function Updates the original values with the interim changes.
ContentEntityBase::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityBase::uuid
ContentEntityBase::validate public function Validates the currently set values. Overrides FieldableEntityInterface::validate
ContentEntityBase::wasDefaultRevision public function Checks whether the entity object was a default revision when it was saved. Overrides RevisionableInterface::wasDefaultRevision
ContentEntityBase::__clone public function Magic method: Implements a deep clone.
ContentEntityBase::__construct public function Constructs an Entity object. Overrides EntityBase::__construct
ContentEntityBase::__get public function Implements the magic method for getting object properties.
ContentEntityBase::__isset public function Implements the magic method for isset().
ContentEntityBase::__set public function Implements the magic method for setting object properties.
ContentEntityBase::__sleep public function Overrides EntityBase::__sleep
ContentEntityBase::__unset public function Implements the magic method for unset().
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function Aliased as: traitSleep 1
DependencySerializationTrait::__wakeup public function 2
EasyEmail::$evaluatedAttachments protected property
EasyEmail::addAttachment public function @inheritDoc Overrides EasyEmailInterface::addAttachment
EasyEmail::addAttachmentPath public function @inheritDoc Overrides EasyEmailInterface::addAttachmentPath
EasyEmail::addBCC public function @inheritDoc Overrides EasyEmailInterface::addBCC
EasyEmail::addBCCAddress public function @inheritDoc Overrides EasyEmailInterface::addBCCAddress
EasyEmail::addCC public function @inheritDoc Overrides EasyEmailInterface::addCC
EasyEmail::addCCAddress public function @inheritDoc Overrides EasyEmailInterface::addCCAddress
EasyEmail::addEntityReferenceById protected function Add an entity by ID to the an entity reference field item list.
EasyEmail::addEvaluatedAttachment public function @inheritDoc Overrides EasyEmailInterface::addEvaluatedAttachment
EasyEmail::addRecipient public function @inheritDoc Overrides EasyEmailInterface::addRecipient
EasyEmail::addRecipientAddress public function @inheritDoc Overrides EasyEmailInterface::addRecipientAddress
EasyEmail::addTextValueToList protected function Add an entity by ID to the an entity reference field item list.
EasyEmail::baseFieldDefinitions public static function Provides base field definitions for an entity type. Overrides RevisionableContentEntityBase::baseFieldDefinitions
EasyEmail::getAttachmentIds public function @inheritDoc Overrides EasyEmailInterface::getAttachmentIds
EasyEmail::getAttachmentPaths public function @inheritDoc Overrides EasyEmailInterface::getAttachmentPaths
EasyEmail::getAttachments public function @inheritDoc Overrides EasyEmailInterface::getAttachments
EasyEmail::getBCC public function @inheritDoc Overrides EasyEmailInterface::getBCC
EasyEmail::getBCCAddresses public function @inheritDoc Overrides EasyEmailInterface::getBCCAddresses
EasyEmail::getBCCIds public function @inheritDoc Overrides EasyEmailInterface::getBCCIds
EasyEmail::getCC public function @inheritDoc Overrides EasyEmailInterface::getCC
EasyEmail::getCCAddresses public function @inheritDoc Overrides EasyEmailInterface::getCCAddresses
EasyEmail::getCCIds public function @inheritDoc Overrides EasyEmailInterface::getCCIds
EasyEmail::getCreatedTime public function Gets the Email creation timestamp. Overrides EasyEmailInterface::getCreatedTime
EasyEmail::getCreator public function Returns the entity creator's user entity. Overrides EasyEmailInterface::getCreator
EasyEmail::getCreatorId public function Returns the entity creator's user ID. Overrides EasyEmailInterface::getCreatorId
EasyEmail::getEntityReferenceIds protected function
EasyEmail::getEvaluatedAttachments public function @inheritDoc Overrides EasyEmailInterface::getEvaluatedAttachments
EasyEmail::getFromAddress public function @inheritDoc Overrides EasyEmailInterface::getFromAddress
EasyEmail::getFromName public function @inheritDoc Overrides EasyEmailInterface::getFromName
EasyEmail::getHtmlBody public function @inheritDoc Overrides EasyEmailInterface::getHtmlBody
EasyEmail::getInboxPreview public function @inheritDoc Overrides EasyEmailInterface::getInboxPreview
EasyEmail::getKey public function @inheritDoc Overrides EasyEmailInterface::getKey
EasyEmail::getListTextValues protected function
EasyEmail::getPlainBody public function @inheritDoc Overrides EasyEmailInterface::getPlainBody
EasyEmail::getRecipientAddresses public function @inheritDoc Overrides EasyEmailInterface::getRecipientAddresses
EasyEmail::getRecipientIds public function @inheritDoc Overrides EasyEmailInterface::getRecipientIds
EasyEmail::getRecipients public function @inheritDoc Overrides EasyEmailInterface::getRecipients
EasyEmail::getReplyToAddress public function @inheritDoc Overrides EasyEmailInterface::getReplyToAddress
EasyEmail::getSentTime public function Returns the Email sent timestamp. Overrides EasyEmailInterface::getSentTime
EasyEmail::getSubject public function @inheritDoc Overrides EasyEmailInterface::getSubject
EasyEmail::isSent public function Returns the Email sent status. Overrides EasyEmailInterface::isSent
EasyEmail::preCreate public static function Changes the values of an entity before it is created. Overrides EntityBase::preCreate
EasyEmail::preSave public function Acts on an entity before the presave hook is invoked. Overrides ContentEntityBase::preSave
EasyEmail::removeAttachment public function @inheritDoc Overrides EasyEmailInterface::removeAttachment
EasyEmail::removeAttachmentPath public function @inheritDoc Overrides EasyEmailInterface::removeAttachmentPath
EasyEmail::removeBCC public function @inheritDoc Overrides EasyEmailInterface::removeBCC
EasyEmail::removeBCCAddress public function @inheritDoc Overrides EasyEmailInterface::removeBCCAddress
EasyEmail::removeCC public function @inheritDoc Overrides EasyEmailInterface::removeCC
EasyEmail::removeCCAddress public function @inheritDoc Overrides EasyEmailInterface::removeCCAddress
EasyEmail::removeEntityReferenceById protected function Remove an entity by ID to the an entity reference field item list.
EasyEmail::removeEvaluatedAttachment public function @inheritDoc Overrides EasyEmailInterface::removeEvaluatedAttachment
EasyEmail::removeRecipient public function @inheritDoc Overrides EasyEmailInterface::removeRecipient
EasyEmail::removeRecipientAddress public function @inheritDoc Overrides EasyEmailInterface::removeRecipientAddress
EasyEmail::removeTextValueFromList protected function Remove an entity by ID to the an entity reference field item list.
EasyEmail::setAttachmentIds public function @inheritDoc Overrides EasyEmailInterface::setAttachmentIds
EasyEmail::setAttachmentPaths public function @inheritDoc Overrides EasyEmailInterface::setAttachmentPaths
EasyEmail::setAttachments public function @inheritDoc Overrides EasyEmailInterface::setAttachments
EasyEmail::setBCC public function @inheritDoc Overrides EasyEmailInterface::setBCC
EasyEmail::setBCCAddresses public function @inheritDoc Overrides EasyEmailInterface::setBCCAddresses
EasyEmail::setBCCIds public function @inheritDoc Overrides EasyEmailInterface::setBCCIds
EasyEmail::setCC public function @inheritDoc Overrides EasyEmailInterface::setCC
EasyEmail::setCCAddresses public function @inheritDoc Overrides EasyEmailInterface::setCCAddresses
EasyEmail::setCCIds public function @inheritDoc Overrides EasyEmailInterface::setCCIds
EasyEmail::setCreatedTime public function Sets the Email creation timestamp. Overrides EasyEmailInterface::setCreatedTime
EasyEmail::setCreator public function Sets the entity creator's user entity. Overrides EasyEmailInterface::setCreator
EasyEmail::setCreatorId public function Sets the entity creator's user ID. Overrides EasyEmailInterface::setCreatorId
EasyEmail::setEvaluatedAttachments public function @inheritDoc Overrides EasyEmailInterface::setEvaluatedAttachments
EasyEmail::setFromAddress public function @inheritDoc Overrides EasyEmailInterface::setFromAddress
EasyEmail::setFromName public function @inheritDoc Overrides EasyEmailInterface::setFromName
EasyEmail::setHtmlBody public function @inheritDoc Overrides EasyEmailInterface::setHtmlBody
EasyEmail::setInboxPreview public function @inheritDoc Overrides EasyEmailInterface::setInboxPreview
EasyEmail::setKey public function @inheritDoc Overrides EasyEmailInterface::setKey
EasyEmail::setPlainBody public function @inheritDoc Overrides EasyEmailInterface::setPlainBody
EasyEmail::setRecipientAddresses public function @inheritDoc Overrides EasyEmailInterface::setRecipientAddresses
EasyEmail::setRecipientIds public function @inheritDoc Overrides EasyEmailInterface::setRecipientIds
EasyEmail::setRecipients public function @inheritDoc Overrides EasyEmailInterface::setRecipients
EasyEmail::setReplyToAddress public function @inheritDoc Overrides EasyEmailInterface::setReplyToAddress
EasyEmail::setSentTime public function Sets the sent timestamp of a Email. Overrides EasyEmailInterface::setSentTime
EasyEmail::setSubject public function @inheritDoc Overrides EasyEmailInterface::setSubject
EasyEmail::urlRouteParameters protected function Gets an array of placeholders for this entity. Overrides EntityBase::urlRouteParameters
EntityBase::$enforceIsNew protected property Boolean indicating whether the entity should be forced to be new.
EntityBase::$entityTypeId protected property The entity type.
EntityBase::$typedData protected property A typed data object wrapping this entity.
EntityBase::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create
EntityBase::delete public function Deletes an entity permanently. Overrides EntityInterface::delete 2
EntityBase::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
EntityBase::entityManager Deprecated protected function Gets the entity manager.
EntityBase::entityTypeBundleInfo protected function Gets the entity type bundle info service.
EntityBase::entityTypeManager protected function Gets the entity type manager.
EntityBase::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyTrait::getCacheContexts
EntityBase::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyTrait::getCacheMaxAge
EntityBase::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyTrait::getCacheTags
EntityBase::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityInterface::getCacheTagsToInvalidate 2
EntityBase::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
EntityBase::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityInterface::getConfigDependencyName 1
EntityBase::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityInterface::getConfigTarget 1
EntityBase::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
EntityBase::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
EntityBase::getListCacheTagsToInvalidate protected function The list cache tags to invalidate for this entity.
EntityBase::getOriginalId public function Gets the original ID. Overrides EntityInterface::getOriginalId 1
EntityBase::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
EntityBase::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
EntityBase::invalidateTagsOnDelete protected static function Invalidates an entity's cache tags upon delete. 1
EntityBase::invalidateTagsOnSave protected function Invalidates an entity's cache tags upon save. 1
EntityBase::isNew public function Determines whether the entity is new. Overrides EntityInterface::isNew 2
EntityBase::languageManager protected function Gets the language manager.
EntityBase::link public function Deprecated way of generating a link to the entity. See toLink(). Overrides EntityInterface::link 1
EntityBase::linkTemplates protected function Gets an array link templates. 1
EntityBase::load public static function Loads an entity. Overrides EntityInterface::load
EntityBase::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
EntityBase::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface::postDelete 16
EntityBase::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad 2
EntityBase::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityInterface::preDelete 4
EntityBase::save public function Saves an entity permanently. Overrides EntityInterface::save 3
EntityBase::setOriginalId public function Sets the original ID. Overrides EntityInterface::setOriginalId 1
EntityBase::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
EntityBase::toUrl public function Gets the URL object for the entity. Overrides EntityInterface::toUrl 2
EntityBase::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
EntityBase::url public function Gets the public URL for this entity. Overrides EntityInterface::url 2
EntityBase::urlInfo public function Gets the URL object for the entity. Overrides EntityInterface::urlInfo 1
EntityBase::uuidGenerator protected function Gets the UUID generator.
EntityChangedTrait::getChangedTime public function Gets the timestamp of the last entity change for the current translation.
EntityChangedTrait::getChangedTimeAcrossTranslations public function Returns the timestamp of the last entity change across all translations.
EntityChangedTrait::setChangedTime public function Sets the timestamp of the last entity change for the current translation.
EntityChangesDetectionTrait::getFieldsToSkipFromTranslationChangesCheck protected function Returns an array of field names to skip when checking for changes. Aliased as: traitGetFieldsToSkipFromTranslationChangesCheck
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function
RevisionLogEntityTrait::getRevisionCreationTime public function Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionCreationTime(). 1
RevisionLogEntityTrait::getRevisionLogMessage public function Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage(). 1
RevisionLogEntityTrait::getRevisionMetadataKey protected static function Gets the name of a revision metadata field.
RevisionLogEntityTrait::getRevisionUser public function Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUser(). 1
RevisionLogEntityTrait::getRevisionUserId public function Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionUserId(). 1
RevisionLogEntityTrait::revisionLogBaseFieldDefinitions public static function Provides revision-related base field definitions for an entity type.
RevisionLogEntityTrait::setRevisionCreationTime public function Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime(). 1
RevisionLogEntityTrait::setRevisionLogMessage public function Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage(). 1
RevisionLogEntityTrait::setRevisionUser public function Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUser(). 1
RevisionLogEntityTrait::setRevisionUserId public function Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionUserId(). 1
SynchronizableEntityTrait::$isSyncing protected property Whether this entity is being created, updated or deleted through a synchronization process.
SynchronizableEntityTrait::isSyncing public function
SynchronizableEntityTrait::setSyncing public function
TranslationStatusInterface::TRANSLATION_CREATED constant Status code identifying a newly created translation.
TranslationStatusInterface::TRANSLATION_EXISTING constant Status code identifying an existing translation.
TranslationStatusInterface::TRANSLATION_REMOVED constant Status code identifying a removed translation.