Skip to content
Snippets Groups Projects

Issue #3327104: Make Drupal 10 ready

2 files
+ 5
14
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 4
13
@@ -109,13 +109,6 @@ class ParagraphsReport {
*/
protected $paraNames;
/**
* Request stack instance.
*
* @var \Symfony\Component\HttpFoundation\RequestStack
*/
protected $request;
/**
* Constructs the controller object.
*
@@ -139,8 +132,7 @@ class ParagraphsReport {
EntityTypeManagerInterface $entityTypeManager,
CurrentPathStack $currentPath,
AliasManager $aliasManager,
PagerManagerInterface $pagerManager,
RequestStack $request_stack) {
PagerManagerInterface $pagerManager) {
$this->configFactory = $configFactory;
$this->entityFieldManager = $entityFieldManager;
$this->entityTypeManager = $entityTypeManager;
@@ -154,7 +146,6 @@ class ParagraphsReport {
$this->paraJson = $this->fetchJson();
$this->paraNames = $this->getParaTypes();
$this->paraCounts = $this->getParaUseCounts();
$this->request = $request_stack;
}
/**
@@ -168,7 +159,6 @@ class ParagraphsReport {
$container->get('path.current'),
$container->get('path_alias.manager'),
$container->get('pager.manager'),
$container->get('request_stack')
);
}
@@ -229,7 +219,7 @@ class ParagraphsReport {
'error_message' => $this->t('Batch failed.'),
'operations' => $operations,
'finished' => 'batch_save',
'file' => drupal_get_path('module', 'paragraphs_report') . '/paragraphs_report.batch.inc',
'file' => \Drupal::service('extension.list.module')->getPath('paragraphs_report') . '/paragraphs_report.batch.inc',
];
return $batch;
}
@@ -304,6 +294,7 @@ class ParagraphsReport {
}
$query = $this->entityTypeManager->getStorage('node');
$nids = $query->getQuery()
->accessCheck(TRUE)
->condition('type', $contentTypes, 'IN')
->execute();
return $nids;
@@ -617,7 +608,7 @@ class ParagraphsReport {
$attributes = ['class' => ['button']];
$params = [];
if ($include_filters) {
$params = $this->request->getCurrentRequest()->query->all();
$params = \Drupal::request()->query->all();
}
$url = Url::fromRoute('paragraphs_report.export', $params, ['attributes' => $attributes]);
return Link::fromTextAndUrl('Export to CSV', $url);
Loading