You are here

public function ViewListController::buildOperations in Views (for Drupal 7) 8.3

Overrides Drupal\Core\Entity\EntityListController::buildOperations();

1 call to ViewListController::buildOperations()
ViewListController::buildRow in views_ui/lib/Drupal/views_ui/ViewListController.php
Overrides Drupal\Core\Entity\EntityListController::buildRow();

File

views_ui/lib/Drupal/views_ui/ViewListController.php, line 132
Definition of Drupal\views_ui\ViewListController.

Class

ViewListController
Provides a listing of Views.

Namespace

Drupal\views_ui

Code

public function buildOperations(EntityInterface $entity) {
  $build = parent::buildOperations($entity);

  // Allow operations to specify that they use AJAX.
  foreach ($build['#links'] as &$operation) {
    if (!empty($operation['ajax'])) {
      $operation['attributes']['class'][] = 'use-ajax';
    }
  }

  // Use the dropbutton #type.
  unset($build['#theme']);
  $build['#type'] = 'dropbutton';
  return $build;
}