Commit 74838bda authored by gbyte.co's avatar gbyte.co

Add imports for type hinting

parent 795efcea
......@@ -6,6 +6,12 @@ use Drupal\Core\Url;
use Drupal\Component\Utility\Html;
use Drupal\Core\Cache\Cache;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\simple_sitemap\Logger;
use Drupal\simple_sitemap\SitemapGenerator;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Path\PathValidator;
use Drupal\Core\Entity\Query\QueryFactory;
/**
* Class BatchUrlGenerator.
......@@ -46,12 +52,12 @@ class BatchUrlGenerator {
* @param $logger
*/
public function __construct(
$sitemap_generator,
$language_manager,
$entity_type_manager,
$path_validator,
$entity_query,
$logger
SitemapGenerator $sitemap_generator,
LanguageManagerInterface $language_manager,
EntityTypeManagerInterface $entity_type_manager,
PathValidator $path_validator,
QueryFactory $entity_query,
Logger $logger
) {
// Todo using only one method, maybe make method static instead?
$this->sitemapGenerator = $sitemap_generator;
......
......@@ -4,6 +4,7 @@ namespace Drupal\simple_sitemap;
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\simple_sitemap\Form\FormHelper;
use Drupal\simple_sitemap\SitemapGenerator;
/**
* Class Simplesitemap.
......@@ -33,7 +34,7 @@ class Simplesitemap {
* @param $dateFormatter
*/
public function __construct(
$sitemapGenerator,
SitemapGenerator $sitemapGenerator,
$configFactoryInterface,
$database,
$entityTypeManager,
......
......@@ -3,6 +3,10 @@
namespace Drupal\simple_sitemap;
use \XMLWriter;
use Drupal\simple_sitemap\Batch\Batch;
use Drupal\Core\Database\Connection;
use Drupal\Core\Extension\ModuleHandler;
use Drupal\Core\Language\LanguageManagerInterface;
/**
* Class SitemapGenerator.
......@@ -33,7 +37,12 @@ class SitemapGenerator {
* @param $module_handler
* @param $language_manager
*/
public function __construct($batch, $database, $module_handler, $language_manager) {
public function __construct(
Batch $batch,
Connection $database,
ModuleHandler $module_handler,
LanguageManagerInterface $language_manager
) {
$this->batch = $batch;
$this->db = $database;
$this->moduleHandler = $module_handler;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment