1 | <?php |
||
16 | class ConfigController extends Admin |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * Servicio que devuelve los parámetros disponibles |
||
21 | * @GET |
||
22 | * @route /admin/config/params |
||
23 | * @label Parámetros de configuración de PSGS |
||
24 | * @visible false |
||
25 | * @return mixed |
||
|
|||
26 | */ |
||
27 | public function getConfigParams() |
||
38 | |||
39 | /** |
||
40 | * Método que gestiona la configuración de las variables |
||
41 | * @GET |
||
42 | * @Route /admin/config |
||
43 | * @return string|null |
||
44 | * @throws \HttpException |
||
45 | */ |
||
46 | 1 | public function config() |
|
47 | { |
||
48 | 1 | Logger::log("Config loaded executed by " . $this->getRequest()->getRequestUri()); |
|
49 | /* @var $form \PSFS\base\config\ConfigForm */ |
||
50 | 1 | $form = new ConfigForm(Router::getInstance()->getRoute('admin-config'), Config::$required, Config::$optional, Config::getInstance()->dumpConfig()); |
|
51 | 1 | $form->build(); |
|
52 | 1 | return $this->render('welcome.html.twig', array( |
|
53 | 1 | 'text' => _("Bienvenido a PSFS"), |
|
54 | 1 | 'config' => $form, |
|
55 | 1 | 'typeahead_data' => array_merge(Config::$required, Config::$optional), |
|
56 | )); |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Servicio que guarda la configuración de la plataforma |
||
61 | * @POST |
||
62 | * @route /admin/config |
||
63 | * @visible false |
||
64 | * @return string |
||
65 | * @throws \HttpException |
||
66 | */ |
||
67 | public function saveConfig() |
||
95 | } |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.