Loading config/autoload/unicaen-import.global.php +1 −1 Changes for config/autoload/unicaen-import.global.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ return [ */ 'entity_source_injector' => [ // Code unique de la source à injecter (null pour désactiver le mécanisme). 'source_code' => 'App', 'source_code' => 'COMUE::SYGAL', ], ], ]; No newline at end of file module/Application/src/Application/Controller/TheseController.php +12 Changes for module/Application/src/Application/Controller/TheseController.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ use Zend\Form\Element\Hidden; use Zend\Http\Response; use Zend\Stdlib\ParametersInterface; use Zend\View\Model\ViewModel; use Application\Service\These\PageDeGarde\PageDeGardePdfExporter; class TheseController extends AbstractController implements VariableServiceAwareInterface , Loading Loading @@ -1362,4 +1363,15 @@ class TheseController extends AbstractController implements } public function generateAction() { $these = $this->requestedThese(); $renderer = $this->getServiceLocator()->get('view_renderer'); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ $exporter = new PageDeGardePdfExporter($renderer, 'A4'); $exporter->setVars([ 'these' => $these, ]); $exporter->export('export.pdf'); exit; } } No newline at end of file module/Application/src/Application/Entity/Db/Individu.php +2 −1 Changes for module/Application/src/Application/Entity/Db/Individu.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,12 +6,13 @@ use Application\Constants; use Application\Filter\NomCompletFormatter; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\SourceAwareInterface; use UnicaenImport\Entity\Db\Traits\SourceAwareTrait; /** * Individu */ class Individu implements HistoriqueAwareInterface class Individu implements HistoriqueAwareInterface, SourceAwareInterface { use HistoriqueAwareTrait; use SourceAwareTrait; Loading module/Application/src/Application/Service/Individu/IndividuService.php +5 −4 Changes for module/Application/src/Application/Service/Individu/IndividuService.php: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -25,17 +25,18 @@ class IndividuService extends BaseService public function createFromPeople(People $people) { $sns = (array)$people->get('sn'); $usuel = array_pop($sns); $patro = array_pop($sns); if ($patro === null) $patro = $usuel; $entity = new Individu(); $entity->setNomUsuel(array_pop($sns)); $entity->setNomUsuel($usuel); $entity->setNomPatronymique($patro); $entity->setPrenom($people->get('givenName')); $entity->setCivilite($people->get('supannCivilite')); $entity->setEmail($people->get('mail')); $entity->setTel($people->get('telephoneNumber')); /** @var Source $source */ $source = $this->getEntityManager()->getRepository(Source::class)->findOneBy(['code' => 'App']); $entity->setSource($source); $entity->setSourceCode($people->get('supannEmpId')); $this->getEntityManager()->persist($entity); Loading module/Application/tests/ApplicationUnitTest/Test/Asset/EntityAsset.php −1 Changes for module/Application/tests/ApplicationUnitTest/Test/Asset/EntityAsset.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ class EntityAsset $e->setNomPatronymique(null); $e->setNomUsuel('Hochon'); $e->setPrenom('Paul'); $e->setTel(null); $e->setCivilite('M.'); return $e; Loading Loading
config/autoload/unicaen-import.global.php +1 −1 Changes for config/autoload/unicaen-import.global.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ return [ */ 'entity_source_injector' => [ // Code unique de la source à injecter (null pour désactiver le mécanisme). 'source_code' => 'App', 'source_code' => 'COMUE::SYGAL', ], ], ]; No newline at end of file
module/Application/src/Application/Controller/TheseController.php +12 Changes for module/Application/src/Application/Controller/TheseController.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ use Zend\Form\Element\Hidden; use Zend\Http\Response; use Zend\Stdlib\ParametersInterface; use Zend\View\Model\ViewModel; use Application\Service\These\PageDeGarde\PageDeGardePdfExporter; class TheseController extends AbstractController implements VariableServiceAwareInterface , Loading Loading @@ -1362,4 +1363,15 @@ class TheseController extends AbstractController implements } public function generateAction() { $these = $this->requestedThese(); $renderer = $this->getServiceLocator()->get('view_renderer'); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ $exporter = new PageDeGardePdfExporter($renderer, 'A4'); $exporter->setVars([ 'these' => $these, ]); $exporter->export('export.pdf'); exit; } } No newline at end of file
module/Application/src/Application/Entity/Db/Individu.php +2 −1 Changes for module/Application/src/Application/Entity/Db/Individu.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,12 +6,13 @@ use Application\Constants; use Application\Filter\NomCompletFormatter; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use UnicaenImport\Entity\Db\Interfaces\SourceAwareInterface; use UnicaenImport\Entity\Db\Traits\SourceAwareTrait; /** * Individu */ class Individu implements HistoriqueAwareInterface class Individu implements HistoriqueAwareInterface, SourceAwareInterface { use HistoriqueAwareTrait; use SourceAwareTrait; Loading
module/Application/src/Application/Service/Individu/IndividuService.php +5 −4 Changes for module/Application/src/Application/Service/Individu/IndividuService.php: 5 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -25,17 +25,18 @@ class IndividuService extends BaseService public function createFromPeople(People $people) { $sns = (array)$people->get('sn'); $usuel = array_pop($sns); $patro = array_pop($sns); if ($patro === null) $patro = $usuel; $entity = new Individu(); $entity->setNomUsuel(array_pop($sns)); $entity->setNomUsuel($usuel); $entity->setNomPatronymique($patro); $entity->setPrenom($people->get('givenName')); $entity->setCivilite($people->get('supannCivilite')); $entity->setEmail($people->get('mail')); $entity->setTel($people->get('telephoneNumber')); /** @var Source $source */ $source = $this->getEntityManager()->getRepository(Source::class)->findOneBy(['code' => 'App']); $entity->setSource($source); $entity->setSourceCode($people->get('supannEmpId')); $this->getEntityManager()->persist($entity); Loading
module/Application/tests/ApplicationUnitTest/Test/Asset/EntityAsset.php −1 Changes for module/Application/tests/ApplicationUnitTest/Test/Asset/EntityAsset.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -103,7 +103,6 @@ class EntityAsset $e->setNomPatronymique(null); $e->setNomUsuel('Hochon'); $e->setPrenom('Paul'); $e->setTel(null); $e->setCivilite('M.'); return $e; Loading