You are here

public function HeartbeatService::loadByNid in Heartbeat 8

File

src/HeartbeatService.php, line 56

Class

HeartbeatService
Class HeartbeatService.

Namespace

Drupal\heartbeat

Code

public function loadByNid($nid) {
  return $this->entityTypeManager
    ->getStorage('heartbeat')
    ->load($this->entityQuery
    ->get('heartbeat')
    ->condition('nid', $nid)
    ->sort('created', 'DESC')
    ->execute());
}