You are here

protected function SimplesitemapQueue::doCreateItems in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 4.x src/Queue/SimpleSitemapQueue.php \Drupal\simple_sitemap\Queue\SimpleSitemapQueue::doCreateItems()
1 call to SimplesitemapQueue::doCreateItems()
SimplesitemapQueue::createItems in src/Queue/SimplesitemapQueue.php

File

src/Queue/SimplesitemapQueue.php, line 98

Class

SimplesitemapQueue
Class SimplesitemapQueue @package Drupal\simple_sitemap\Queue

Namespace

Drupal\simple_sitemap\Queue

Code

protected function doCreateItems($data_sets) {
  $query = $this->connection
    ->insert(static::TABLE_NAME)
    ->fields([
    'name',
    'data',
    'created',
  ]);
  foreach ($data_sets as $i => $data) {
    $query
      ->values([
      $this->name,
      serialize($data),
      $this->time
        ->getRequestTime(),
    ]);
  }
  return $query
    ->execute();
}