You are here

public function PcbCommands::listBins in Permanent Cache Bin 8

Same name and namespace in other branches
  1. 8.2 src/Commands/PcbCommands.php \Drupal\pcb\Commands\PcbCommands::listBins()

List permanent cache bins.

@usage pcb-list Usage description

@command pcb:list @aliases pcb-list, permanent-cache-bin-list

File

src/Commands/PcbCommands.php, line 90

Class

PcbCommands
A Drush commandfile for pcb module.

Namespace

Drupal\pcb\Commands

Code

public function listBins() {
  $bins = Cache::getBins();
  foreach ($bins as $bin => $object) {
    if (method_exists($object, 'deleteAllPermanent')) {
      $this
        ->io()
        ->writeln($bin);
    }
  }
  $this
    ->io()
    ->writeln('');
}