You are here

private function CiviEntityStorage::getCiviCrmApi in CiviCRM Entity 8.3

Gets the CiviCRM API

Return value

\Drupal\civicrm_entity\CiviCrmApiInterface The CiviCRM APi.

File

src/CiviEntityStorage.php, line 45

Class

CiviEntityStorage
Defines entity class for external CiviCRM entities.

Namespace

Drupal\civicrm_entity

Code

private function getCiviCrmApi() {
  if (!$this->civicrmApi) {
    $this->civicrmApi = \Drupal::service('civicrm_entity.api');
  }
  return $this->civicrmApi;
}