You are here

public function AlphaPagination::getAreaHandlers in Views Alpha Pagination 8.2

Retrieves all available alpha pagination areas.

Parameters

array $types: The handler types to search.

Return value

\Drupal\alpha_pagination\Plugin\views\area\AlphaPaginationArea[] An array of alpha pagination areas.

1 call to AlphaPagination::getAreaHandlers()
AlphaPagination::validate in src/AlphaPagination.php

File

src/AlphaPagination.php, line 329

Class

AlphaPagination
A base views handler for alpha pagination.

Namespace

Drupal\alpha_pagination

Code

public function getAreaHandlers(array $types = [
  'header',
  'footer',
]) {
  $areas = [];
  foreach ($types as $type) {
    foreach ($this->handler->displayHandler
      ->getHandlers($type) as $handler) {
      if ($handler instanceof AlphaPaginationArea) {
        $areas[] = $handler;
      }
    }
  }
  return $areas;
}