Skip to content

Commit

Permalink
Merge pull request #22 from discoverygarden/DGI10-117
Browse files Browse the repository at this point in the history
D10-117: Update for Symfony 6.
  • Loading branch information
willtp87 authored Nov 8, 2023
2 parents 07f7be3 + ed69c63 commit 933cbf5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Controller/IpRangeAccessExemptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ public static function create(ContainerInterface $container) {
public function response() {
$ranges = [];
$cache_tags = [];
$resources = (array) $this->request->query->get('resources', []);
/** @var \Drupal\embargo\IpRangeInterface[] $entities */
$entities = $this->entityTypeManager()->getStorage('embargo_ip_range')->loadMultiple((array) $this->request->query->get('ranges', []));
$entities = $this->entityTypeManager()->getStorage('embargo_ip_range')->loadMultiple($this->request->query->all()['ranges'] ?? []);
foreach ($entities as $entity) {
$ranges[] = [
'label' => $entity->label(),
Expand All @@ -59,7 +58,7 @@ public function response() {

return [
'#theme' => 'embargo_ip_access_exemption',
'#resources' => $resources,
'#resources' => $this->request->query->all()['resources'] ?? [],
'#ranges' => $ranges,
'#contact_email' => $this->config('embargo.settings')->get('contact_email'),
'#cache' => [
Expand Down

0 comments on commit 933cbf5

Please sign in to comment.