Skip to content
Snippets Groups Projects
Commit ef7a2e09 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

- Possibilité d'intialiser un formulaire Code à partir de données GET

- Nouvelle méthode Util::url(string $view, array $params) pour retourner l'URL d'un script UnicaenCode et lui fournir les paramètres GET
parent ecca97c5
No related branches found
No related tags found
No related merge requests found
Pipeline #36887 passed
CHANGELOG CHANGELOG
========= =========
6.4.0 (02/04/2025)
------------------
- Possibilité d'intialiser un formulaire Code à partir de données GET
- Nouvelle méthode Util::url(string $view, array $params) pour retourner l'URL d'un script UnicaenCode et lui fournir les paramètres GET
6.3.0 (30/01/2025) 6.3.0 (30/01/2025)
------------------ ------------------
......
...@@ -32,14 +32,12 @@ class CodeGeneratorService ...@@ -32,14 +32,12 @@ class CodeGeneratorService
{ {
/* Récupération de l'input */ /* Récupération de l'input */
if (true === $input) { if (true === $input) {
if (Util::inConsole()) {
$input = Util::$inputParams; $input = Util::$inputParams;
if (Util::inConsole()) {
$state = self::STATE_CONSOLE; $state = self::STATE_CONSOLE;
} elseif (Util::isPost()) { } elseif (Util::isPost()) {
$input = Util::$inputParams;
$state = self::STATE_WEB_GEN; $state = self::STATE_WEB_GEN;
} else { } else {
$input = [];
$state = self::STATE_WEB_DISPLAY; $state = self::STATE_WEB_DISPLAY;
} }
} elseif (is_array($input)) { } elseif (is_array($input)) {
......
...@@ -13,7 +13,7 @@ use UnicaenCode\Service\ConfigService; ...@@ -13,7 +13,7 @@ use UnicaenCode\Service\ConfigService;
use UnicaenCode\Service\IntrospectionService; use UnicaenCode\Service\IntrospectionService;
use Laminas\Form\Form; use Laminas\Form\Form;
use Laminas\Mvc\Controller\AbstractActionController; use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Helper\Url;
/** /**
* *
...@@ -230,6 +230,18 @@ class Util ...@@ -230,6 +230,18 @@ class Util
public static function url(string $view, array $params = []): string
{
/* @var $url Url */
$url = self::$container->get('ViewHelperManager')->get('url');
$view = str_replace('/', '.', $view);
return $url->__invoke('unicaen-code', ['view' => $view], ['query' => $params]);
}
public static function prepareDump($variable) public static function prepareDump($variable)
{ {
if (is_array($variable)) { if (is_array($variable)) {
...@@ -366,7 +378,8 @@ class Util ...@@ -366,7 +378,8 @@ class Util
} }
?> ?>
</div> </div>
<div style="margin-left:8em;margin-top:1px;margin-bottom:5px<?php if ($bl['inVendor']) echo ';opacity:.5' ?>"> <div
style="margin-left:8em;margin-top:1px;margin-bottom:5px<?php if ($bl['inVendor']) echo ';opacity:.5' ?>">
<?php <?php
self::highlight($bl['class'] . $bl['type'] . $bl['function'] . $bl['args'], 'php'); self::highlight($bl['class'] . $bl['type'] . $bl['function'] . $bl['args'], 'php');
?> ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment