public function LinkStatusHandlerBase::queueItems in Link checker 8
Creates a queue for handling.
Parameters
\Drupal\linkchecker\LinkCheckerLinkInterface $link: The link.
\Psr\Http\Message\ResponseInterface $response: The response of link checking.
Overrides LinkStatusHandlerInterface::queueItems
File
- src/
Plugin/ LinkStatusHandlerBase.php, line 88
Class
- LinkStatusHandlerBase
- Base class for Link status handler plugins.
Namespace
Drupal\linkchecker\PluginCode
public function queueItems(LinkCheckerLinkInterface $link, ResponseInterface $response) {
$items = $this
->getItems($link, $response);
if (empty($this->queue
->numberOfItems())) {
$this->queue
->createQueue();
}
foreach ($items as $item) {
$data = [];
$data['links'] = $item;
$data['response'] = $response;
$data['handler'] = $this
->getPluginId();
$this->queue
->createItem($data);
}
}