You are here

public function HostMultipleWhitelist::executeMultiple in http:BL 8

Executes the plugin for an array of objects.

Parameters

array $objects: An array of entities.

Overrides ActionBase::executeMultiple

1 call to HostMultipleWhitelist::executeMultiple()
HostMultipleWhitelist::execute in src/Plugin/Action/HostMultipleWhitelist.php
Executes the plugin.

File

src/Plugin/Action/HostMultipleWhitelist.php, line 74

Class

HostMultipleWhitelist
Redirects to a host white-list confirm form.

Namespace

Drupal\httpbl\Plugin\Action

Code

public function executeMultiple(array $entities) {
  $info = [];

  /** @var \Drupal\httpbl\HostInterface $host */
  foreach ($entities as $host) {
    $host_ip = $host
      ->getHostIp();
    $info[$host
      ->id()][$host_ip] = $host_ip;
  }
  $this->tempStore
    ->set($this->currentUser
    ->id(), $info);
}