You are here

public function Simplesitemap::__construct in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 8.2 src/Simplesitemap.php \Drupal\simple_sitemap\Simplesitemap::__construct()

Simplesitemap constructor.

Parameters

\Drupal\simple_sitemap\EntityHelper $entity_helper:

\Drupal\simple_sitemap\SimplesitemapSettings $settings:

\Drupal\simple_sitemap\SimplesitemapManager $manager:

\Drupal\Core\Config\ConfigFactory $config_factory:

\Drupal\Core\Database\Connection $database:

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager:

\Drupal\Core\Path\PathValidator $path_validator:

\Drupal\Core\Datetime\DateFormatter $date_formatter:

\Drupal\Component\Datetime\Time $time:

\Drupal\simple_sitemap\Queue\QueueWorker $queue_worker:

\Drupal\Core\Lock\LockBackendInterface $lock:

\Drupal\simple_sitemap\Logger $logger:

File

src/Simplesitemap.php, line 119

Class

Simplesitemap
Class Simplesitemap @package Drupal\simple_sitemap

Namespace

Drupal\simple_sitemap

Code

public function __construct(EntityHelper $entity_helper, SimplesitemapSettings $settings, SimplesitemapManager $manager, ConfigFactory $config_factory, Connection $database, EntityTypeManagerInterface $entity_type_manager, PathValidator $path_validator, DateFormatter $date_formatter, Time $time, QueueWorker $queue_worker, LockBackendInterface $lock = NULL, Logger $logger = NULL) {
  $this->entityHelper = $entity_helper;
  $this->settings = $settings;
  $this->manager = $manager;
  $this->configFactory = $config_factory;
  $this->db = $database;
  $this->entityTypeManager = $entity_type_manager;
  $this->pathValidator = $path_validator;
  $this->dateFormatter = $date_formatter;
  $this->time = $time;
  $this->queueWorker = $queue_worker;
  if ($lock === NULL) {
    @trigger_error('Calling Simplesitemap::__construct() without the $lock argument is deprecated in simple_sitemap:3.9. The $lock argument will be required in simple_sitemap:3.10.', E_USER_DEPRECATED);
    $lock = \Drupal::service('lock');
  }
  $this->lock = $lock;
  if ($logger === NULL) {
    @trigger_error('Calling Simplesitemap::__construct() without the $logger argument is deprecated in simple_sitemap:3.9. The $logger argument will be required in simple_sitemap:3.10.', E_USER_DEPRECATED);
    $logger = \Drupal::service('simple_sitemap.logger');
  }
  $this->logger = $logger;
}