Commit 559bb1f5 authored by Florian Joriot's avatar Florian Joriot
Browse files

Correction formulaire centreCout

Correction affichage d'une formation
parent 26af2ce8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -199,11 +199,11 @@ class LocalContextService extends AbstractService

    /**
     *
     * @param Etape $etape
     * @param Etape|null $etape
     *
     * @return self
     */
    public function setEtape(Etape $etape = null)
    public function setEtape(?Etape $etape = null)
    {
        $this->etape                        = $etape;
        $this->getSessionContainer()->etape = $etape ? $etape->getId() : null;
+1 −0
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle
        $structure = $this->context()->structureFromQuery() ?: $this->getServiceContext()->getStructure();
        $niveau = $this->context()->niveauFromQuery();
        $etape = $this->context()->etapeFromQuery();
        if ($etape) $etape = $this->getServiceEtape()->get($etape); // entité Niveau
        if ($niveau) $niveau = $this->getServiceNiveauEtape()->get($niveau); // entité Niveau

        return [$structure, $niveau, $etape];
+3 −4
Original line number Diff line number Diff line
@@ -3,10 +3,9 @@
namespace OffreFormation\Entity\Db;

use Application\Entity\Db\CentreCoutEp;
use Application\Entity\Db\Service;
use Enseignement\Entity\Db\Service;
use Application\Entity\Db\Traits\AnneeAwareTrait;
use Application\Entity\Db\Traits\PeriodeAwareTrait;
use Application\Entity\Db\Traits\SourceAwareTrait;
use Application\Entity\Db\Traits\StructureAwareTrait;
use Laminas\Permissions\Acl\Resource\ResourceInterface;
use OffreFormation\Entity\Db\Traits\DisciplineAwareTrait;
@@ -18,7 +17,7 @@ use UnicaenApp\Service\EntityManagerAwareInterface;
use UnicaenApp\Service\EntityManagerAwareTrait;
use UnicaenImport\Entity\Db\Interfaces\ImportAwareInterface;
use UnicaenImport\Entity\Db\Traits\ImportAwareTrait;
use function Application\Entity\Db\count;
use function count;


/**
@@ -790,7 +789,7 @@ class ElementPedagogique implements HistoriqueAwareInterface, ResourceInterface,
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCentreCoutEp(TypeHeures $th = null)
    public function getCentreCoutEp(TypeHeures $th = null): \Doctrine\Common\Collections\Collection
    {
        if (!$th) {
            return $this->centreCoutEp;