You are here

public function ProductBundleViewsData::getViewsData in Commerce Product Bundle 8

Returns views data for the entity type.

Return value

array Views data in the format of hook_views_data().

Overrides EntityViewsData::getViewsData

File

src/Entity/ProductBundleViewsData.php, line 16

Class

ProductBundleViewsData
Provides Views data for product bundle entities.

Namespace

Drupal\commerce_product_bundle\Entity

Code

public function getViewsData() {
  $data = parent::getViewsData();
  $data['commerce_product_bundle']['table']['base'] = [
    'field' => 'id',
    'title' => $this
      ->t('Product bundle'),
    'help' => $this
      ->t('The product bundle ID.'),
  ];
  return $data;
}