Commit f2abb02f authored by joriot221's avatar joriot221
Browse files

Bouton synchroniser element pedagogique caché lorsque non synchronisable

parent 11cdfefd
Loading
Loading
Loading
Loading
+4 −1
Changes for module/Application/config/offre-formation.config.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -532,7 +532,6 @@ return [
        'invokables' => [
            'etapeModulateursSaisieForm'          => View\Helper\OffreFormation\EtapeModulateursSaisieForm::class,
            'elementModulateursSaisieFieldset'    => View\Helper\OffreFormation\ElementModulateursSaisieFieldset::class,
            'elementPedagogique'                  => View\Helper\OffreFormation\ElementPedagogiqueViewHelper::class,
            'etape'                               => View\Helper\OffreFormation\EtapeViewHelper::class,
            'etapeCentreCoutForm'                 => View\Helper\OffreFormation\EtapeCentreCoutFormViewHelper::class,
            'elementCentreCoutFieldset'           => View\Helper\OffreFormation\ElementCentreCoutFieldsetViewHelper::class,
@@ -540,5 +539,9 @@ return [
            'elementTauxMixiteFieldset'           => View\Helper\OffreFormation\ElementTauxMixiteFieldsetViewHelper::class,
            'fieldsetElementPedagogiqueRecherche' => View\Helper\OffreFormation\FieldsetElementPedagogiqueRecherche::class,
        ],
        'factories'  => [
            'elementPedagogique' => View\Helper\OffreFormation\Factory\ElementPedagogiqueViewHelperFactory::class,
        ],

    ],
];
 No newline at end of file
−1
Changes for module/Application/src/Controller/OffreFormation/Factory/ElementPedagogiqueControllerFactory.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
namespace Application\Controller\OffreFormation\Factory;

use Application\Controller\OffreFormation\ElementPedagogiqueController;
use Application\Controller\OffreFormationController;
use Psr\Container\ContainerInterface;
use UnicaenImport\Service\SchemaService;

+4 −2
Changes for module/Application/src/View/Helper/OffreFormation/ElementPedagogiqueViewHelper.php: 4 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ use Application\Entity\Db\Traits\ElementPedagogiqueAwareTrait;
use Application\Provider\Privilege\Privileges;
use Laminas\View\Helper\AbstractHtmlElement;
use Application\Util;
use UnicaenImport\Service\Traits\SchemaServiceAwareTrait;

/**
 * Description of ElementPedagogiqueViewHelper
@@ -16,6 +17,7 @@ use Application\Util;
class ElementPedagogiqueViewHelper extends AbstractHtmlElement
{
    use ElementPedagogiqueAwareTrait;
    use SchemaServiceAwareTrait;


    /**
@@ -53,7 +55,6 @@ class ElementPedagogiqueViewHelper extends AbstractHtmlElement
    public function renderDescription()
    {
        $entity = $this->getElementPedagogique();

        if (!$entity) {
            return '';
        }
@@ -94,8 +95,9 @@ class ElementPedagogiqueViewHelper extends AbstractHtmlElement
    public function render()
    {
        $entity  = $this->getElementPedagogique();
        $schemas = $this->getServiceSchema();

        if (!$entity) {
        if (!$entity || !$schemas) {
            return '';
        }

+29
Changes for module/Application/src/View/Helper/OffreFormation/Factory/ElementPedagogiqueViewHelperFactory.php: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
/*
* @author JORIOT Florian <florian.joriot at unicaen.fr>
*/

namespace Application\View\Helper\OffreFormation\Factory;

use Application\View\Helper\OffreFormation\ElementPedagogiqueViewHelper;

use Psr\Container\ContainerInterface;
use UnicaenImport\Service\SchemaService;

class ElementPedagogiqueViewHelperFactory
{
    /**
     * Create controller
     *
     * @param ContainerInterface $container
     *
     * @return ElementPedagogiqueViewHelper
     */
    public function __invoke(ContainerInterface $container)
    {
        $controller = new ElementPedagogiqueViewHelper();
        $controller->setServiceSchema($container->get(SchemaService::class));

        return $controller;
    }
}
 No newline at end of file