Minor - Remove unused code

pull/3959/head
Julio 4 years ago
parent eba065a171
commit f65e0f2ec2
  1. 1
      src/CoreBundle/Controller/ResourceController.php
  2. 3
      src/CoreBundle/Resources/views/Layout/base-layout.html.twig
  3. 14
      src/CoreBundle/Settings/SettingsManager.php

@ -22,7 +22,6 @@ use Chamilo\CourseBundle\Controller\CourseControllerInterface;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\Criteria;
use Symfony\Component\Filesystem\Exception\FileNotFoundException; use Symfony\Component\Filesystem\Exception\FileNotFoundException;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

@ -14,9 +14,6 @@
</head> </head>
{% endblock %} {% endblock %}
<body class="font-sans antialiased {{ section_name }}"> <body class="font-sans antialiased {{ section_name }}">
{# data-course-id="{{ course ? course.id : 0 }}"#}
{# data-course-code="{{ course ? course.code : '' }}"#}
{# data-session-id="{{ session ? session.id : 0 }}"#}
<noscript>{{ "Your browser does not support Javascript" | trans }}</noscript> <noscript>{{ "Your browser does not support Javascript" | trans }}</noscript>
{%- block chamilo_wrap -%} {%- block chamilo_wrap -%}
{%- block page_content %} {%- block page_content %}

@ -45,11 +45,12 @@ class SettingsManager implements SettingsManagerInterface
* @var Settings[] * @var Settings[]
*/ */
protected array $resolvedSettings = []; protected array $resolvedSettings = [];
//protected $settings;
/** /**
* @var null|array<string, Settings>|mixed[] * @var null|array<string, Settings>|mixed[]
*/ */
protected ?array $schemaList; protected ?array $schemaList;
protected RequestStack $request; protected RequestStack $request;
public function __construct( public function __construct(
@ -100,10 +101,7 @@ class SettingsManager implements SettingsManagerInterface
} }
} }
/** public function getSchemas(): array
* @return array
*/
public function getSchemas()
{ {
return $this->schemaRegistry->all(); return $this->schemaRegistry->all();
} }
@ -119,13 +117,11 @@ class SettingsManager implements SettingsManagerInterface
} }
/** /**
* @param string $name
*
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
public function getSetting($name) public function getSetting(string $name)
{ {
if (false === strpos($name, '.')) { if (!str_contains($name, '.')) {
//throw new \InvalidArgumentException(sprintf('Parameter must be in format "namespace.name", "%s" given.', $name)); //throw new \InvalidArgumentException(sprintf('Parameter must be in format "namespace.name", "%s" given.', $name));
// This code allows the possibility of calling // This code allows the possibility of calling

Loading…
Cancel
Save