You are here

public function ConnectionViewsData::getViewsData in RedHen CRM 8

Returns views data for the entity type.

Return value

array Views data in the format of hook_views_data().

Overrides EntityViewsData::getViewsData

File

modules/redhen_connection/src/Entity/ConnectionViewsData.php, line 15

Class

ConnectionViewsData
Provides Views data for Connection entities.

Namespace

Drupal\redhen_connection\Entity

Code

public function getViewsData() {
  $data = parent::getViewsData();

  // Unset the default entity relationships.
  // It does not work properly, the target type it is not defined.
  unset($data['redhen_connection']['endpoint_1']['relationship']);
  unset($data['redhen_connection']['endpoint_2']['relationship']);
  return $data;
}