Skip to content

Commit

Permalink
[Bug]: Add getSubscribedServices to AdminController (#103)
Browse files Browse the repository at this point in the history
* add getSubscribedServices

* Apply php-cs-fixer changes

---------

Co-authored-by: kingjia90 <kingjia90@users.noreply.github.com>
  • Loading branch information
kingjia90 and kingjia90 authored Jul 14, 2023
1 parent 5fb1ed4 commit cc80b95
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Controller/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;

/**
* Class AdminController
Expand All @@ -41,6 +42,17 @@ class AdminController extends \Pimcore\Bundle\AdminBundle\Controller\AdminContro
/* @var bool $orderByName */
private $orderByName = false;

/**
* @return string[]
*/
public static function getSubscribedServices()
{
$services = parent::getSubscribedServices();
$services['translator'] = TranslatorInterface::class;

return $services;
}

/**
* @param Request $request
*
Expand Down

0 comments on commit cc80b95

Please sign in to comment.