You are here

protected function EasyEmail::getEntityReferenceIds in Easy Email 8

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

Parameters

\Drupal\Core\Field\EntityReferenceFieldItemList $field_item_list:

Return value

int[] The entity IDs

6 calls to EasyEmail::getEntityReferenceIds()
EasyEmail::addEntityReferenceById in src/Entity/EasyEmail.php
Add an entity by ID to the an entity reference field item list.
EasyEmail::getAttachmentIds in src/Entity/EasyEmail.php
@inheritDoc
EasyEmail::getBCCIds in src/Entity/EasyEmail.php
@inheritDoc
EasyEmail::getCCIds in src/Entity/EasyEmail.php
@inheritDoc
EasyEmail::getRecipientIds in src/Entity/EasyEmail.php
@inheritDoc

... See full list

File

src/Entity/EasyEmail.php, line 820

Class

EasyEmail
Defines the Email entity.

Namespace

Drupal\easy_email\Entity

Code

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;
}