You are here

public static function Registrant::getRegistrantsIdsForIdentity in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Registrant.php \Drupal\rng\Entity\Registrant::getRegistrantsIdsForIdentity()
  2. 3.x src/Entity/Registrant.php \Drupal\rng\Entity\Registrant::getRegistrantsIdsForIdentity()

Get registrants belonging to an identity.

Parameters

\Drupal\Core\Entity\EntityInterface $identity: An identity entity.

Return value

int[] An array of registrant entity IDs.

Overrides RegistrantInterface::getRegistrantsIdsForIdentity

1 call to Registrant::getRegistrantsIdsForIdentity()
RngEntityModel::deletePerson in src/RngEntityModel.php
Delete related entities when a person entity.

File

src/Entity/Registrant.php, line 109

Class

Registrant
Defines the registrant entity class.

Namespace

Drupal\rng\Entity

Code

public static function getRegistrantsIdsForIdentity(EntityInterface $identity) {
  return \Drupal::entityQuery('registrant')
    ->condition('identity__target_type', $identity
    ->getEntityTypeId(), '=')
    ->condition('identity__target_id', $identity
    ->id(), '=')
    ->execute();
}