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
Branches
Tags 6.4.0
No related merge requests found
Pipeline #36887 passed
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)
------------------
......
......@@ -32,14 +32,12 @@ class CodeGeneratorService
{
/* Récupération de l'input */
if (true === $input) {
if (Util::inConsole()) {
$input = Util::$inputParams;
if (Util::inConsole()) {
$state = self::STATE_CONSOLE;
} elseif (Util::isPost()) {
$input = Util::$inputParams;
$state = self::STATE_WEB_GEN;
} else {
$input = [];
$state = self::STATE_WEB_DISPLAY;
}
} elseif (is_array($input)) {
......
......@@ -13,7 +13,7 @@ use UnicaenCode\Service\ConfigService;
use UnicaenCode\Service\IntrospectionService;
use Laminas\Form\Form;
use Laminas\Mvc\Controller\AbstractActionController;
use Laminas\View\Helper\Url;
/**
*
......@@ -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)
{
if (is_array($variable)) {
......@@ -366,7 +378,8 @@ class Util
}
?>
</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
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 to comment