Remove unused code

pull/3064/head
Julio 5 years ago
parent 989b352f28
commit 5d321e5e2d
  1. 1
      src/CoreBundle/Controller/AccountController.php
  2. 19
      src/CourseBundle/Controller/SettingsController.php

@ -11,7 +11,6 @@ use FOS\UserBundle\Model\UserManagerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Class UserController.

@ -3,13 +3,12 @@
namespace Chamilo\CourseBundle\Controller;
use Chamilo\CoreBundle\Controller\BaseController;
use Chamilo\CourseBundle\Manager\SettingsManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Sylius\Bundle\SettingsBundle\Form\Factory\SettingsFormFactoryInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Component\Validator\Exception\ValidatorException;
/**
@ -17,7 +16,7 @@ use Symfony\Component\Validator\Exception\ValidatorException;
*
* @author Paweł Jędrzejewski <pawel@sylius.org>
*/
class SettingsController extends AbstractController
class SettingsController extends BaseController
{
/**
* Edit configuration with given namespace.
@ -46,13 +45,13 @@ class SettingsController extends AbstractController
try {
$manager->setCourse($course);
$manager->saveSettings($namespace, $form->getData());
$message = $this->getTranslator()->trans(
$message = $this->trans(
'sylius.settings.update',
[],
'flashes'
);
} catch (ValidatorException $exception) {
$message = $this->getTranslator()->trans(
$message = $this->trans(
$exception->getMessage(),
[],
'validators'
@ -105,14 +104,4 @@ class SettingsController extends AbstractController
{
return $this->get('chamilo_course.settings.form_factory');
}
/**
* Get translator.
*
* @return TranslatorInterface
*/
protected function getTranslator()
{
return $this->get('translator');
}
}

Loading…
Cancel
Save