You are here

public function XmlSitemapGenerator::__construct in XML sitemap 2.x

Same name and namespace in other branches
  1. 8 src/XmlSitemapGenerator.php \Drupal\xmlsitemap\XmlSitemapGenerator::__construct()

Constructs a XmlSitemapGenerator object.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory object.

\Drupal\Core\State\StateInterface $state: The state handler.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: Language Manager.

\Psr\Log\LoggerInterface $logger: A logger instance.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Database\Connection $connection: The database connection.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.

\Drupal\Core\File\FileSystemInterface $file_system: The file system.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

File

src/XmlSitemapGenerator.php, line 147

Class

XmlSitemapGenerator
XmlSitemap generator service class.

Namespace

Drupal\xmlsitemap

Code

public function __construct(ConfigFactoryInterface $config_factory, StateInterface $state, LanguageManagerInterface $language_manager, LoggerInterface $logger, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, Connection $connection, MessengerInterface $messenger, FileSystemInterface $file_system, TimeInterface $time) {
  $this->config = $config_factory
    ->getEditable('xmlsitemap.settings');
  $this->state = $state;
  $this->languageManager = $language_manager;
  $this->logger = $logger;
  $this->moduleHandler = $module_handler;
  $this->entityTypeManager = $entity_type_manager;
  $this->connection = $connection;
  $this->messenger = $messenger;
  $this->fileSystem = $file_system;
  $this->time = $time;
}