You are here

public function CivicrmEntityViewsData::__construct in CiviCRM Entity 8.3

Constructs an EntityViewsData object.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type to provide views integration for.

\Drupal\Core\Entity\Sql\SqlEntityStorageInterface $storage_controller: The storage handler used for this entity type.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\StringTranslation\TranslationInterface $translation_manager: The translation manager.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

Overrides EntityViewsData::__construct

File

src/CivicrmEntityViewsData.php, line 27

Class

CivicrmEntityViewsData

Namespace

Drupal\civicrm_entity

Code

public function __construct(EntityTypeInterface $entity_type, SqlEntityStorageInterface $storage_controller, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, TranslationInterface $translation_manager, EntityFieldManagerInterface $entity_field_manager = NULL, CiviCrmApiInterface $civicrm_api) {
  parent::__construct($entity_type, $storage_controller, $entity_type_manager, $module_handler, $translation_manager, $entity_field_manager);
  $this->civicrmApi = $civicrm_api;
  $this->civicrmApi
    ->civicrmInitialize();
}