Skip to content
Snippets Groups Projects
Commit d264cac3 authored by Bernd Oliver Suenderhauf's avatar Bernd Oliver Suenderhauf
Browse files

Issue #3044743 by Pancho: Remove functions/services deprecated in Drupal Core 8.6 or earlier

parent a03cd761
No related branches found
No related tags found
No related merge requests found
......@@ -102,8 +102,7 @@ class HandlePdfController extends ControllerBase {
$container->get('fillpdf.token_resolver'),
$container->get('request_stack'),
$container->get('plugin.manager.fillpdf_backend'),
$container->get('plugin.manager.fillpdf_action.processor'),
$container->get('entity.query')
$container->get('plugin.manager.fillpdf_action.processor')
);
}
......
......@@ -4,10 +4,17 @@ namespace Drupal\fillpdf\Form;
use Drupal\Core\Form\FormBase;
@trigger_error('FillPdfAdminFormBase is deprecated in fillpdf:8.x-4.7 and will be removed from fillpdf:8.x-5.0. Use \Drupal\Core\Form\FormBase instead. See https://www.drupal.org/project/fillpdf/issues/3044743', E_USER_DEPRECATED);
/**
* Class FillPdfAdminFormBase.
*
* @package Drupal\fillpdf\Form
*
* @deprecated in fillpdf:8.x-4.7 and will be removed from fillpdf:8.x-5.0. Use
* FormBase instead.
* @see https://www.drupal.org/project/fillpdf/issues/3044743
* @see \Drupal\Core\Form\FormBase
*/
abstract class FillPdfAdminFormBase extends FormBase {
......
......@@ -3,11 +3,10 @@
namespace Drupal\fillpdf\Form;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Core\Entity\Query\QueryFactory;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\File\FileSystemInterface;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\file\Entity\File;
use Drupal\fillpdf\FillPdfBackendManager;
......@@ -18,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* FillPDF overview form.
*/
class FillPdfOverviewForm extends FillPdfAdminFormBase {
class FillPdfOverviewForm extends FormBase {
/**
* The module handler.
......@@ -34,20 +33,6 @@ class FillPdfOverviewForm extends FillPdfAdminFormBase {
*/
protected $backendManager;
/**
* The current user account.
*
* @var \Drupal\Core\Session\AccountInterface
*/
protected $currentUser;
/**
* The entity query factory.
*
* @var \Drupal\Core\Entity\Query\QueryFactory
*/
protected $entityQuery;
/**
* The file system.
*
......@@ -69,22 +54,14 @@ class FillPdfOverviewForm extends FillPdfAdminFormBase {
* The module handler.
* @param \Drupal\fillpdf\FillPdfBackendManager $backend_manager
* The FillPDF backend manager.
* @param \Drupal\Core\Session\AccountInterface $current_user
* The current user account.
* @param \Drupal\Core\Entity\Query\QueryFactory $entity_query
* The entity query factory.
* @param \Drupal\Core\File\FileSystemInterface $file_system
* The file system.
* @param \Drupal\fillpdf\InputHelperInterface $input_helper
* The FillPDF input helper.
*/
public function __construct(ModuleHandlerInterface $module_handler, FillPdfBackendManager $backend_manager, AccountInterface $current_user, QueryFactory $entity_query, FileSystemInterface $file_system, InputHelperInterface $input_helper) {
parent::__construct();
public function __construct(ModuleHandlerInterface $module_handler, FillPdfBackendManager $backend_manager, FileSystemInterface $file_system, InputHelperInterface $input_helper) {
$this->moduleHandler = $module_handler;
$this->backendManager = $backend_manager;
$this->currentUser = $current_user;
$this->entityQuery = $entity_query;
$this->fileSystem = $file_system;
$this->inputHelper = $input_helper;
}
......@@ -95,10 +72,7 @@ class FillPdfOverviewForm extends FillPdfAdminFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('module_handler'),
// Load the plugin manager.
$container->get('plugin.manager.fillpdf_backend'),
$container->get('current_user'),
$container->get('entity.query'),
$container->get('file_system'),
$container->get('fillpdf.input_helper')
);
......
......@@ -4,23 +4,27 @@ namespace Drupal\fillpdf\Service;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\fillpdf\FillPdfContextManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class FillPdfContextManager implements FillPdfContextManagerInterface {
/** @var EntityTypeManagerInterface $entityTypeManager */
/**
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*
* The entity type manager.
*/
protected $entityTypeManager;
/**
* Constructs FillPdfContextManager.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
}
public static function create(ContainerInterface $container) {
return new static($container->get('entity.manager'));
}
/**
* {@inheritDoc}
* {@inheritdoc}
*/
public function loadEntities(array $context) {
$entities = [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment