{@inheritdoc}

@see Category::getRecipientIDs()
482172
protected function getRecipientIDs(NotificationEntity $notification)
    {
        $result = [];
        $locale = null;
        $notificationData = $notification->getNotificationData();
        $commentsRepository = $this->app->make(TranslatableCommentRepository::class);
        $someComment = false;
        // Let's notify also all the people involved in the whole discussions
        foreach (array_keys($notificationData['comments']) as $commentID) {
            $comment = $commentsRepository->find($commentID);
            if ($comment !== null) {
                $someComment = true;
                $result = array_merge($result, $this->getCommentPeopleIDs($comment->getRootComment()));
            }
        }
        if ($someComment === false) {
            throw new Exception(t('No comment found (have they been deleted?)'));
        }
        if ($notificationData['localeID'] === null) {
            // Discussions about source strings (not locale specific): let's notify the global administrators
            $ul = new UserList();
            $ul->disableAutomaticSorting();
            $ul->filterByGroup($this->getGroupsHelper()->getGlobalAdministrators());
            $ul->filterByAttribute('notify_translatable_messages', 1);
            $result = array_merge($result, $ul->getResultIDs());
        } else {
            // Locale-specific discussions: let's notify the people involved in that locale
            $locale = $this->app->make(LocaleRepository::class)->findApproved($notificationData['localeID']);
            if ($locale === null) {
                throw new Exception(t('Unable to find the locale with ID %s', $notificationData['localeID']));
            }
            $ul = new UserList();
            $ul->disableAutomaticSorting();
            $ul->filterByGroup($this->getGroupsHelper()->getTranslators($locale));
            $ul->filterByAttribute('notify_translatable_messages', 1);
            $result = array_merge($result, $ul->getResultIDs());
            $ul = new UserList();
            $ul->disableAutomaticSorting();
            $ul->filterByGroup($this->getGroupsHelper()->getAdministrators($locale));
            $ul->filterByAttribute('notify_translatable_messages', 1);
            $result = array_merge($result, $ul->getResultIDs());
        }

        return $result;
    }
498175
public function findExpiredIdentifiers(): array
    {
        $queryBuilder = $this->createQuery();
        $rows = $queryBuilder->select('identifier')
            ->from($this->getTableName())
            ->where($queryBuilder->expr()->lt(
                'expires',
                $queryBuilder->createNamedParameter((new DateTimeService())->getCurrentTime(), \PDO::PARAM_INT)
            ))
            ->groupBy('identifier')
            ->execute()
            ->fetchAll();

        $cacheIdentifiers = [];
        foreach ($rows as $row) {
            $cacheIdentifiers[] = $row['identifier'];
        }

        return $cacheIdentifiers;
    }
367444
public function getSubscriptionInvoices(int $subscriptionId): array
    {
        $results = $this->_createInvoiceQuery()
            ->where(['subscriptionId' => $subscriptionId])
            ->orderBy(['dateCreated' => SORT_DESC])
            ->all();

        $invoices = [];

        foreach ($results as $result) {
            $result['invoiceData'] = Json::decodeIfJson($result['invoiceData']);
            $invoices[] = new Invoice($result);
        }

        return $invoices;
    }
1038474
public function getSimilarRecommListIds()
    {
        if ($this->_aSimilarRecommListIds === null) {
            $this->_aSimilarRecommListIds = false;

            $aList = $this->getArticleList();
            if ($aList && $aList->count() > 0) {
                $this->_aSimilarRecommListIds = $aList->arrayKeys();
            }
        }

        return $this->_aSimilarRecommListIds;
    }
1307595
public function getRelatedItemCallIds($deliveryResultIdentifier)
    {
        $keys = $this->getPersistence()->keys(self::PREFIX_CALL_ID . $deliveryResultIdentifier . '.*');
        array_walk($keys, 'self::subStrPrefix', self::PREFIX_CALL_ID);

        return $keys;
    }
1260247
public function getRecipientSpecificNewsletterSubject(array $generalContentItems, array $recipientContentItems, array $params, RecipientInterface $recipient, $locale)
    {
        return parent::getRecipientSpecificNewsletterSubject($generalContentItems, $recipientContentItems, $params, $recipient, $locale);
    }
233277
public function getChildrenDsIds($dsId, $level = 1)
    {
        $childrenDsIds = (array_key_exists($dsId, $this->childrenMap))
            ? $this->childrenMap[$dsId]
            : [];

        if (($level > 1) && count($childrenDsIds)) {
            $subChildDsIds = [$childrenDsIds];

            foreach ($childrenDsIds as $childDsId) {
                $subChildDsIds[] = $this->getChildrenDsIds($childDsId, $level - 1);
            }

            $childrenDsIds = call_user_func_array('array_merge', $subChildDsIds);
        }

        return $childrenDsIds;
    }
343178
public function findAllIdentifiers(): array
    {
        $queryBuilder = $this->createQuery();
        $rows = $queryBuilder->select('identifier')
            ->from($this->getTableName())
            ->groupBy('identifier')
            ->execute()
            ->fetchAll();

        $cacheIdentifiers = [];
        foreach ($rows as $row) {
            $cacheIdentifiers[] = $row['identifier'];
        }

        return $cacheIdentifiers;
    }
879473
protected function getFieldIds($contentId, array $fieldIdentifiers)
    {
        $ids = [];
        foreach ($fieldIdentifiers as $identifier) {
            try {
                $ids[] = $this->contentTypeUtils->getFieldId($contentId, $identifier);
            } catch (OutOfBoundsException $e) {
                continue;
            }
        }

        return $ids;
    }
430278
public function getDealerContactIds()
    {
        if (null === $this->dealer_contact_ids_unserialized) {
            $this->dealer_contact_ids_unserialized = array();
        }
        if (!$this->dealer_contact_ids_unserialized && null !== $this->dealer_contact_ids) {
            $dealer_contact_ids_unserialized = substr($this->dealer_contact_ids, 2, -2);
            $this->dealer_contact_ids_unserialized = $dealer_contact_ids_unserialized ? explode(' | ', $dealer_contact_ids_unserialized) : array();
        }

        return $this->dealer_contact_ids_unserialized;
    }
163484
public function getRecipientsTypeAllowableValues()
    {
        return [
            self::RECIPIENTS_TYPE_ALL,
            self::RECIPIENTS_TYPE_NON_CLICKERS,
            self::RECIPIENTS_TYPE_NON_OPENERS,
            self::RECIPIENTS_TYPE_CLICKERS,
            self::RECIPIENTS_TYPE_OPENERS,
            self::RECIPIENTS_TYPE_SOFT_BOUNCES,
            self::RECIPIENTS_TYPE_HARD_BOUNCES,
            self::RECIPIENTS_TYPE_UNSUBSCRIBED,
        ];
    }
1313530
private static function _usersToRecipients($users)
    {
        $out = array();

        if (!is_array($users)) {
            $users = array($users);
        };

        foreach ($users as $id) {
            $user = grab('user_resolve', $id);
            if ($user !== false) {
                if ($user['name'] !== '') {
                    $out[] = '' . filter('clean_name', $user['name']) . ' <' . $user['email'] . '>';
                } else {
                    $out[] = $user['email'];
                };
            };
        };

        return (count($out) > 0) ? implode(', ', $out) : null;
    }
1104265
public function getAllNodeIdentifiers()
    {
        $ret = [];

        if ($this->isSuccessful) {
            foreach ($this->rawResponse['hits']['hits'] as $document) {
                $ret[] = $document['_id'];
            }
        }

        return $ret;
    }
68291
public function findUndeliveredRecipientNotification(IdentifierRecipientInterface $recipient)
    {
        $builder = $this->createQueryBuilder('notification');

        $this->addRecipientConditions($builder, $recipient);

        $builder->andWhere($builder->expr()->isNull('notification.deliveredAt'));

        return $builder->getQuery()->getResult();
    }
1213613
public function getRecipients()
    {
        switch ($this->getSystemMessageType()) {
            case self::LETTER_TYPE_NORMAL:
                return $this->data['recipients'];
                break;

            case self::LETTER_TYPE_HYBRID:
                return $this->data['recipientsPrinted'];
                break;
        }

        return null;
    }
596786
public function getRecipient($id)
    {
        return $this->managerRegistry->getManager()->getRepository($this->userClass)->find($id);
    }
7987
protected function getRecipients($notifiable, $notification, $message)
    {
        if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) {
            $recipients = [$recipients];
        }

        return collect($recipients)->mapWithKeys(function ($recipient, $email) {
            return is_numeric($email)
                    ? [$email => (is_string($recipient) ? $recipient : $recipient->email)]
                    : [$email => $recipient];
        })->all();
    }