public static function getExistingActivities($memberCampaignId, $date, $activityIds = []) {
    $query = \Drupal::entityQuery('openy_campaign_memb_camp_actv')
      ->condition('member_campaign', $memberCampaignId)
      ->condition('date', $date->format('U'));
    if (!empty($activityIds)) {
      $query->condition('activity', $activityIds, 'IN');
    }
    return $query->execute();
  }
public static function getExistingActivities($memberCampaignId, $date, $activityIds = []) {
    $query = \Drupal::entityQuery('openy_campaign_memb_camp_actv')
      ->condition('member_campaign', $memberCampaignId)
      ->condition('date', $date->format('U'));
    if (!empty($activityIds)) {
      $query->condition('activity', $activityIds, 'IN');
    }
    return $query->execute();
  }
public static function getExistingActivities ( $ memberCampaignId , $ date , $ activityIds = [ ] ) { $ query = \ Drupal :: entityQuery ( 'openy_campaign_memb_camp_actv' ) -> condition ( 'member_campaign' , $ memberCampaignId ) -> condition ( 'date' , $ date -> format ( 'U' ) ) ; if ( ! empty ( $ activityIds ) ) { $ query -> condition ( 'activity' , $ activityIds , 'IN' ) ; } return $ query -> execute ( ) ; }
Get Existing Activities.

@param int $memberCampaignId
MemberCampaign entity ID.
@param \DateTime $date
Date.
@param array|NULL $activityIds
Activities IDs.

@return array|int
Get Existing Activities .