Commit 16e9c79f authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Importation des locaux, etages, batiments et site

parent 8fe4ec25
Loading
Loading
Loading
Loading
+3 −6
Changes for module/Octopus/config/module.config.php: 3 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@ use Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Octopus\Controller\OctopusController;
use Octopus\Controller\OctopusControllerFactory;
use Octopus\Service\Immobilier\ImmobilierService;
use Octopus\Service\Immobilier\ImmobilierServiceFactory;
use Octopus\Service\Structure\StructureService;
use Octopus\Service\Structure\StructureServiceFactory;
use UnicaenAuth\Guard\PrivilegeController;
@@ -66,13 +68,8 @@ return [
    ],
    'service_manager' => [
        'factories' => [
//            'doctrine.connection.orm_octopus'    => new \DoctrineORMModule\Service\DBALConnectionFactory('orm_octopus'),
//            'doctrine.configuration.orm_octopus' => new \DoctrineORMModule\Service\ConfigurationFactory('orm_octopus'),
//            'doctrine.entitymanager.orm_octopus' => new \DoctrineORMModule\Service\EntityManagerFactory('orm_octopus'),
//            'doctrine.driver.orm_octopus'        => new \DoctrineModule\Service\DriverFactory('orm_octopus'),
//            'doctrine.eventmanager.orm_octopus'  => new \DoctrineModule\Service\EventManagerFactory('orm_octopus'),

            StructureService::class => StructureServiceFactory::class,
            ImmobilierService::class => ImmobilierServiceFactory::class,
        ],
    ],
    'controllers'     => [
+13
Changes for module/Octopus/src/Octopus/Controller/OctopusController.php: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,11 +2,13 @@

namespace Octopus\Controller;

use Octopus\Service\Immobilier\ImmobilierServiceAwareTrait;
use Octopus\Service\Structure\StructureServiceAwareTrait;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class OctopusController extends AbstractActionController {
    use ImmobilierServiceAwareTrait;
    use StructureServiceAwareTrait;

    public function indexAction() {
@@ -14,9 +16,20 @@ class OctopusController extends AbstractActionController {
        $structureTypes = $this->getStructureService()->getStructuresTypes('libelle');
        $structures     = $this->getStructureService()->getStructures('libelleCourt');

        $locals         = $this->getImmobiliserService()->getImmobilierLocals('libelle');
        $niveaux        = $this->getImmobiliserService()->getImmobilierNiveaux('libelle');
        $batiments      = $this->getImmobiliserService()->getImmobilierBatiments('libelle');
        $sites          = $this->getImmobiliserService()->getImmobilierSites('libelle');


        return new ViewModel([
            'structureTypes' => $structureTypes,
            'structures' => $structures,

            'locals' => $locals,
            'niveaux' => $niveaux,
            'batiments' => $batiments,
            'sites' => $sites,
        ]);
    }
}
 No newline at end of file
+7 −1
Changes for module/Octopus/src/Octopus/Controller/OctopusControllerFactory.php: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Octopus\Controller;

use Octopus\Service\Immobilier\ImmobilierService;
use Octopus\Service\Structure\StructureService;
use Zend\Mvc\Controller\ControllerManager;

@@ -9,12 +10,17 @@ class OctopusControllerFactory {

    public function __invoke(ControllerManager $manager)
    {
        /** @var StructureService $structureService */
        /**
         * @var StructureService $structureService
         * @var ImmobilierService $immobilierService
         */
        $structureService = $manager->getServiceLocator()->get(StructureService::class);
        $immobilierService = $manager->getServiceLocator()->get(ImmobilierService::class);

        /** @var OctopusController $controller */
        $controller = new OctopusController();
        $controller->setStructureService($structureService);
        $controller->setImmobiliserService($immobilierService);
        return $controller;
    }
}
 No newline at end of file
+102
Changes for module/Octopus/src/Octopus/Entity/Db/ImmobilierBatiment.php: 102 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Octopus\Entity\Db;

use UnicaenApp\Entity\HistoriqueAwareTrait;

class ImmobilierBatiment {
    use HistoriqueAwareTrait;

    /** @var integer */
    private $id;
    /** @var string */
    private $code;
    /** @var string */
    private $numero;
    /** @var string */
    private $nom;
    /** @var string */
    private $libelle;
    /** @var string */
    private $libelleCourt;
    /** @var string */
    private $clefSequoia;
    /** @var integer */
    private $clefGestimmo;
    /** @var ImmobilierSite */
    private $site;

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * @return string
     */
    public function getNumero()
    {
        return $this->numero;
    }

    /**
     * @return string
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * @return string
     */
    public function getLibelle()
    {
        return $this->libelle;
    }

    /**
     * @return string
     */
    public function getLibelleCourt()
    {
        return $this->libelleCourt;
    }

    /**
     * @return string
     */
    public function getClefSequoia()
    {
        return $this->clefSequoia;
    }

    /**
     * @return int
     */
    public function getClefGestimmo()
    {
        return $this->clefGestimmo;
    }

    /**
     * @return ImmobilierSite
     */
    public function getSite()
    {
        return $this->site;
    }


}
 No newline at end of file
+214
Changes for module/Octopus/src/Octopus/Entity/Db/ImmobilierLocal.php: 214 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

namespace Octopus\Entity\Db;

use UnicaenApp\Entity\HistoriqueAwareTrait;

class ImmobilierLocal {
    use HistoriqueAwareTrait;

    /** @var integer */
    private $id;
    /** @var string */
    private $nom;
    /** @var string */
    private $libelle;
    /** @var string */
    private $libelleCourantFaible;
    /** @var string */
    private $clefSequoia;
    /** @var integer */
    private $clefGestimmo;
    /** @var integer */
    private $affectation;
    /** @var Structure */
    private $structure;
    /** @var ImmobilierNiveau */
    private $niveau;
    /** @var integer */
    private $surface;
    /** @var integer */
    private $nbPlaces;
    /** @var boolean */
    private $accesHandi;
    /** @var boolean */
    private $videoProjecteur;
    /** @var boolean */
    private $tableauBlanc;
    /** @var boolean */
    private $posteInformatique;
    /** @var boolean */
    private $sonorisation;
    /** @var boolean */
    private $sonorisationExceptionnelle;
    /** @var boolean */
    private $occultation;
    /** @var boolean */
    private $accesPmr;
    /** @var integer */
    private $calendrier;

    /**
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @return string
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * @return string
     */
    public function getLibelle()
    {
        return $this->libelle;
    }

    /**
     * @return string
     */
    public function getLibelleCourantFaible()
    {
        return $this->libelleCourantFaible;
    }

    /**
     * @return string
     */
    public function getClefSequoia()
    {
        return $this->clefSequoia;
    }

    /**
     * @return int
     */
    public function getClefGestimmo()
    {
        return $this->clefGestimmo;
    }

    /**
     * @return int
     */
    public function getAffectation()
    {
        return $this->affectation;
    }

    /**
     * @return Structure
     */
    public function getStructure()
    {
        return $this->structure;
    }

    /**
     * @return ImmobilierNiveau
     */
    public function getNiveau()
    {
        return $this->niveau;
    }

    /**
     * @return int
     */
    public function getSurface()
    {
        return $this->surface;
    }

    /**
     * @return int
     */
    public function getNbPlaces()
    {
        return $this->nbPlaces;
    }

    /**
     * @return bool
     */
    public function isAccesHandi()
    {
        return $this->accesHandi;
    }

    /**
     * @return bool
     */
    public function isVideoProjecteur()
    {
        return $this->videoProjecteur;
    }

    /**
     * @return bool
     */
    public function isTableauBlanc()
    {
        return $this->tableauBlanc;
    }

    /**
     * @return bool
     */
    public function isPosteInformatique()
    {
        return $this->posteInformatique;
    }

    /**
     * @return bool
     */
    public function isSonorisation()
    {
        return $this->sonorisation;
    }

    /**
     * @return bool
     */
    public function isSonorisationExceptionnelle()
    {
        return $this->sonorisationExceptionnelle;
    }

    /**
     * @return bool
     */
    public function isOccultation()
    {
        return $this->occultation;
    }

    /**
     * @return bool
     */
    public function isAccesPmr()
    {
        return $this->accesPmr;
    }

    /**
     * @return int
     */
    public function getCalendrier()
    {
        return $this->calendrier;
    }




}
 No newline at end of file
Loading