You are here

protected function CivicrmEntityViewsData::getViewsFieldPlugin in CiviCRM Entity 8.3

Get the views field handler.

Parameters

array $field_metadata: An array of field metadata.

Return value

array An array containing the corresponding values for the 'field' key.

1 call to CivicrmEntityViewsData::getViewsFieldPlugin()
CivicrmEntityViewsData::processViewsDataForCustomFields in src/CivicrmEntityViewsData.php
Add views integration for custom fields.

File

src/CivicrmEntityViewsData.php, line 614

Class

CivicrmEntityViewsData

Namespace

Drupal\civicrm_entity

Code

protected function getViewsFieldPlugin(array $field_metadata) {
  switch ($field_metadata['data_type']) {
    case 'File':
      return [
        'id' => 'civicrm_entity_custom_file',
      ];
  }
  return [
    'id' => 'civicrm_entity_custom_field',
  ];
}