You are here

public function PurgersService::getTypesByPurger in Purge 8.3

Retrieve the list of supported invalidation types per purger instance.

Return value

string[] Array with the purger instance ID as key, and list of invalidation types.

Overrides PurgersServiceInterface::getTypesByPurger

See also

\Drupal\purge\Annotation\PurgePurger::$types

\Drupal\purge\Plugin\Purge\Purger\PurgerInterface::getId()

1 call to PurgersService::getTypesByPurger()
PurgersService::invalidate in src/Plugin/Purge/Purger/PurgersService.php
Invalidate content from external caches.

File

src/Plugin/Purge/Purger/PurgersService.php, line 308

Class

PurgersService
Provides the service that distributes access to one or more purgers.

Namespace

Drupal\purge\Plugin\Purge\Purger

Code

public function getTypesByPurger() {
  if (is_null($this->typesByPurger)) {
    $this
      ->initializePurgers();
    $this->typesByPurger = [];
    foreach ($this
      ->getPluginsEnabled(FALSE) as $id => $plugin_id) {
      $this->typesByPurger[$id] = $this->purgers[$id]
        ->getTypes();
    }
  }
  return $this->typesByPurger;
}