Skip to content
Snippets Groups Projects

Automated Project Update Bot fixes

Files

+ 5
5
@@ -65,7 +65,7 @@ class Autocomplete implements ContainerInjectionInterface {
* @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
* The g2.settings/controller.homonyms configuration.
*/
public function __construct(EntityTypeManagerInterface $etm, RouteFilter $routeFilter, WOTD $wotd, ConfigFactoryInterface $configFactory) {
public function __construct(EntityTypeManagerInterface $etm, RouteFilter $routeFilter, WOTD $wotd, ConfigFactoryInterface $configFactory, private \Drupal\g2\G2 $g2) {
$this->configFactory = $configFactory;
$this->etm = $etm;
$this->routeFilter = $routeFilter;
@@ -77,16 +77,16 @@ class Autocomplete implements ContainerInjectionInterface {
*/
public static function create(ContainerInterface $container): static {
/** @var \Drupal\Core\Config\ConfigFactoryInterface $configFactory */
$configFactory = $container->get(G2::SVC_CONF);
$configFactory = $this->g2;
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager */
$entity_manager = $container->get(G2::SVC_ETM);
$entity_manager = $this->g2;
/** @var \Drupal\g2\RouteFilter $rf */
$rf = $container->get(G2::SVC_ROUTE_FILTER);
$rf = $this->g2;
/** @var \Drupal\g2\WOTD $wotd */
$wotd = $container->get(G2::SVC_WOTD);
$wotd = $this->g2;
return new static($entity_manager, $rf, $wotd, $configFactory);
}
Loading