You are here

public function HeartbeatService::loadByTypes in Heartbeat 8

File

src/HeartbeatService.php, line 52

Class

HeartbeatService
Class HeartbeatService.

Namespace

Drupal\heartbeat

Code

public function loadByTypes($types) {
  return $this->entityTypeManager
    ->getStorage("heartbeat")
    ->loadMultiple($this->entityQuery
    ->get('heartbeat')
    ->condition('type', $types, 'IN')
    ->sort('created', 'DESC')
    ->execute());
}