Commit b0653398 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Merge branch 'master' of git.unicaen.fr:dsi/sygal

parents 6e2498ab 2a66137c
Loading
Loading
Loading
Loading
+1 −1
Changes for config/autoload/unicaen-import.global.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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
+12
Changes for module/Application/src/Application/Controller/TheseController.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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 ,
@@ -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
+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
@@ -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;
+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
@@ -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);
−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
@@ -103,7 +103,6 @@ class EntityAsset
        $e->setNomPatronymique(null);
        $e->setNomUsuel('Hochon');
        $e->setPrenom('Paul');
        $e->setTel(null);
        $e->setCivilite('M.');

        return $e;