cloud-8.x-2.0-beta1/modules/cloud_service_providers/k8s/src/Entity/K8sReplicaSetViewsData.php

modules/cloud_service_providers/k8s/src/Entity/K8sReplicaSetViewsData.php
<?php

namespace Drupal\k8s\Entity;

use Drupal\views\EntityViewsData;

/**
 * Provides the views data for the ReplicaSet entity type.
 */
class K8sReplicaSetViewsData extends EntityViewsData {

  /**
   * {@inheritdoc}
   */
  public function getViewsData() {
    $data = parent::getViewsData();

    $data['k8s_replica_set']['replica_set_bulk_form'] = [
      'title' => $this->t('Replica set operations bulk form'),
      'help' => $this->t('Add a form element that lets you run operations on multiple ReplicaSets.'),
      'field' => [
        'id' => 'replica_set_bulk_form',
      ],
    ];

    // Additional information for Views integration, such as table joins, can be
    // put here.
    $data['k8s_replica_set']['table']['base']['access query tag'] = 'k8s_entity_views_access_with_namespace';

    return $data;
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc