Commit 2a0acf6e authored by lecluse's avatar lecluse
Browse files

Refactoring : renomage des services (doivent se terminer par *Service)

parent de7ef182
<?php
use Application\Service\ContextService;
use Application\Service\SourceService;
function creerAdmin($sl, array $admin)
{
......@@ -11,8 +12,8 @@ function creerAdmin($sl, array $admin)
/** @var \Application\Service\ContextService $serviceContext */
$serviceContext = $sl->get(ContextService::class);
/** @var \Application\Service\Source $serviceSource */
$serviceSource = $sl->get('applicationSource');
/** @var \Application\Service\SourceService $serviceSource */
$serviceSource = $sl->get(SourceService::class);
$nom = $admin['nom'];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -130,22 +130,22 @@ return [
],
'service_manager' => [
'invokables' => [
'ApplicationAnnee' => Service\Annee::class,
Service\ContextService::class => Service\ContextService::class,
'ApplicationLocalContext' => Service\LocalContext::class,
'ApplicationParametres' => Service\Parametres::class,
'ApplicationUtilisateur' => Service\Utilisateur::class,
'ApplicationTypeIntervention' => Service\TypeIntervention::class,
'ApplicationSource' => Service\Source::class,
'ApplicationAffectation' => Service\Affectation::class,
'ApplicationRole' => Service\Role::class,
'ApplicationPays' => Service\Pays::class,
'ApplicationDepartement' => Service\Departement::class,
'applicationFichier' => Service\FichierService::class,
'applicationTauxHoraireHETD' => Service\TauxHoraireHETDService::class,
'dbEvent' => Service\DbEventService::class,
'UnicaenAuth\Service\Privilege' => Service\PrivilegeService::class,
'assertionInformation' => Assertion\InformationAssertion::class,
Service\AnneeService::class => Service\AnneeService::class,
Service\ContextService::class => Service\ContextService::class,
'ApplicationLocalContext' => Service\LocalContext::class,
'ApplicationParametres' => Service\Parametres::class,
'ApplicationUtilisateur' => Service\Utilisateur::class,
'ApplicationTypeIntervention' => Service\TypeIntervention::class,
Service\SourceService::class => Service\SourceService::class,
Service\AffectationService::class => Service\AffectationService::class,
'ApplicationRole' => Service\Role::class,
'ApplicationPays' => Service\Pays::class,
'ApplicationDepartement' => Service\Departement::class,
'applicationFichier' => Service\FichierService::class,
'applicationTauxHoraireHETD' => Service\TauxHoraireHETDService::class,
'dbEvent' => Service\DbEventService::class,
'UnicaenAuth\Service\Privilege' => Service\PrivilegeService::class,
'assertionInformation' => Assertion\InformationAssertion::class,
],
'factories' => [
'navigation' => Service\NavigationFactoryFactory::class,
......
......@@ -20,46 +20,46 @@ return [
'intervenant' => '[0-9]*',
],
'defaults' => [
'controller' => 'Agrement',
'controller' => 'AgrementService',
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
'conseil-academique' => [
'conseil-academique' => [
'type' => 'Segment',
'options' => [
'route' => '/conseil-academique',
'defaults' => [
'action' => 'lister',
'route' => '/conseil-academique',
'defaults' => [
'action' => 'lister',
'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE,
],
],
],
'conseil-restreint' => [
'conseil-restreint' => [
'type' => 'Segment',
'options' => [
'route' => '/conseil-restreint',
'defaults' => [
'action' => 'lister',
'route' => '/conseil-restreint',
'defaults' => [
'action' => 'lister',
'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT,
],
],
],
'ajouter' => [
'ajouter' => [
'type' => 'Segment',
'options' => [
'route' => '/:typeAgrement/ajouter[/:structure]',
'constraints' => [
'typeAgrement' => '[0-9]*',
'structure' => '[0-9]*',
'structure' => '[0-9]*',
],
'defaults' => [
'action' => 'saisir',
],
],
],
'voir' => [
'voir' => [
'type' => 'Segment',
'options' => [
'route' => '/voir/:agrement',
......@@ -71,7 +71,7 @@ return [
],
],
],
'saisir' => [
'saisir' => [
'type' => 'Segment',
'options' => [
'route' => '/saisir/[:agrement]',
......@@ -83,7 +83,7 @@ return [
],
],
],
'supprimer' => [
'supprimer' => [
'type' => 'Segment',
'options' => [
'route' => '/supprimer/[:agrement]',
......@@ -106,37 +106,37 @@ return [
'options' => [
'route' => '/agrement',
'defaults' => [
'controller' => 'Agrement',
'controller' => 'AgrementService',
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
'conseil-academique' => [
'conseil-academique' => [
'type' => 'Segment',
'options' => [
'route' => '/conseil-academique',
'defaults' => [
'action' => 'saisir-lot',
'route' => '/conseil-academique',
'defaults' => [
'action' => 'saisir-lot',
'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_ACADEMIQUE,
],
],
],
'conseil-restreint' => [
'conseil-restreint' => [
'type' => 'Segment',
'options' => [
'route' => '/conseil-restreint',
'defaults' => [
'action' => 'saisir-lot',
'route' => '/conseil-restreint',
'defaults' => [
'action' => 'saisir-lot',
'typeAgrementCode' => TypeAgrement::CODE_CONSEIL_RESTREINT,
],
],
],
'export-csv' => [
'export-csv' => [
'type' => 'Literal',
'options' => [
'route' => '/export-csv',
'defaults' => [
'route' => '/export-csv',
'defaults' => [
'action' => 'export-csv',
],
],
......@@ -207,7 +207,7 @@ return [
'resource' => PrivilegeController::getResourceId('Application\Controller\Agrement', 'saisir-lot'),
'visible' => 'AssertionAgrement',
],
'export-csv' => [
'export-csv' => [
'label' => 'Export CSV',
'description' => 'Export CSV des agrément donnés ou en attente',
'title' => 'Export CSV',
......@@ -249,12 +249,12 @@ return [
'controller' => 'Application\Controller\Agrement',
'action' => ['export-csv'],
'privileges' => [
Privileges::AGREMENT_EXPORT_CSV
Privileges::AGREMENT_EXPORT_CSV,
],
],
[
'controller' => 'Application\Controller\Agrement',
'action' => ['supprimer'],
'action' => ['supprimer'],
'privileges' => [
Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION,
Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION,
......@@ -265,8 +265,8 @@ return [
],
'resource_providers' => [
'BjyAuthorize\Provider\Resource\Config' => [
'Agrement' => [],
'TblAgrement' => [],
'AgrementService' => [],
'TblAgrement' => [],
],
],
'rule_providers' => [
......@@ -277,9 +277,9 @@ return [
Privileges::AGREMENT_CONSEIL_ACADEMIQUE_EDITION,
Privileges::AGREMENT_CONSEIL_RESTREINT_EDITION,
Privileges::AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION,
Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION
Privileges::AGREMENT_CONSEIL_RESTREINT_SUPPRESSION,
],
'resources' => ['TblAgrement', 'Agrement', 'Structure'],
'resources' => ['TblAgrement', 'AgrementService', 'StructureService'],
'assertion' => 'AssertionAgrement',
],
],
......@@ -293,7 +293,7 @@ return [
],
'service_manager' => [
'invokables' => [
'ApplicationAgrement' => Service\Agrement::class,
Service\AgrementService::class => Service\AgrementService::class,
'ApplicationTblAgrement' => Service\TblAgrementService::class,
'ApplicationTypeAgrement' => Service\TypeAgrement::class,
'ApplicationTypeAgrementStatut' => Service\TypeAgrementStatut::class,
......
......@@ -250,7 +250,7 @@ return [
Privileges::BUDGET_EDITION_ENGAGEMENT_COMPOSANTE,
Privileges::BUDGET_EDITION_ENGAGEMENT_ETABLISSEMENT,
],
'resources' => ['Dotation', 'Structure', 'TypeRessource'],
'resources' => ['Dotation', 'StructureService', 'TypeRessource'],
'assertion' => 'assertionBudget',
],
],
......
......@@ -331,7 +331,7 @@ return [
'allow' => [
[
'privileges' => ChargensAssertion::SCENARIO_EDITION,
'resources' => ['Scenario', 'Structure'],
'resources' => ['Scenario', 'StructureService'],
'assertion' => 'AssertionChargens',
],
[
......@@ -339,7 +339,7 @@ return [
Privileges::CHARGENS_SEUIL_ETABLISSEMENT_EDITION,
Privileges::CHARGENS_SEUIL_COMPOSANTE_EDITION,
],
'resources' => ['Structure'],
'resources' => ['StructureService'],
'assertion' => 'AssertionChargens',
],
],
......
......@@ -123,7 +123,7 @@ return [
'allow' => [
[
'privileges' => Privileges::MODULATEUR_VISUALISATION,
'resources' => ['TypeModulateur', 'Structure'],
'resources' => ['TypeModulateur', 'StructureService'],
'assertion' => 'assertionModulateur',
],
],
......
......@@ -292,32 +292,32 @@ return [
'allow' => [
[
'privileges' => Privileges::ODF_ELEMENT_EDITION,
'resources' => ['ElementPedagogique', 'Structure'],
'resources' => ['ElementPedagogique', 'StructureService'],
'assertion' => 'AssertionOffreDeFormation',
],
[
'privileges' => Privileges::ODF_ETAPE_EDITION,
'resources' => ['Etape', 'Structure'],
'resources' => ['Etape', 'StructureService'],
'assertion' => 'AssertionOffreDeFormation',
],
[
'privileges' => Privileges::ODF_CENTRES_COUT_EDITION,
'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'CentreCoutEp'],
'resources' => ['Etape', 'StructureService', 'ElementPedagogique', 'CentreCoutEp'],
'assertion' => 'AssertionOffreDeFormation',
],
[
'privileges' => Privileges::ODF_MODULATEURS_EDITION,
'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'ElementModulateur'],
'resources' => ['Etape', 'StructureService', 'ElementPedagogique', 'ElementModulateur'],
'assertion' => 'AssertionOffreDeFormation',
],
[
'privileges' => Privileges::ODF_TAUX_MIXITE_EDITION,
'resources' => ['Etape', 'Structure', 'ElementPedagogique'],
'resources' => ['Etape', 'StructureService', 'ElementPedagogique'],
'assertion' => 'AssertionOffreDeFormation',
],
[
'privileges' => Privileges::ODF_ELEMENT_VH_EDITION,
'resources' => ['Etape', 'Structure', 'ElementPedagogique','VolumeHoraireEns','TypeIntervention'],
'resources' => ['Etape', 'StructureService', 'ElementPedagogique','VolumeHoraireEns','TypeIntervention'],
'assertion' => 'AssertionOffreDeFormation',
],
],
......
......@@ -462,16 +462,16 @@ return [
],
'service_manager' => [
'invokables' => [
'ApplicationService' => Service\ServiceService::class,
'ApplicationServiceReferentiel' => Service\ServiceReferentiel::class,
'ApplicationFonctionReferentiel' => Service\FonctionReferentiel::class,
'ApplicationPeriode' => Service\Periode::class,
'ApplicationMotifNonPaiement' => Service\MotifNonPaiement::class,
'ApplicationModificationServiceDu' => Service\ModificationServiceDu::class,
'ApplicationCampagneSaisie' => Service\CampagneSaisieService::class,
'assertionService' => Assertion\ServiceAssertion::class,
'processusService' => Processus\ServiceProcessus::class,
'processusServiceReferentiel' => Processus\ServiceReferentielProcessus::class,
'ApplicationService' => Service\ServiceService::class,
'ApplicationServiceReferentiel' => Service\ServiceReferentiel::class,
'ApplicationFonctionReferentiel' => Service\FonctionReferentiel::class,
'ApplicationPeriode' => Service\Periode::class,
'ApplicationMotifNonPaiement' => Service\MotifNonPaiement::class,
'ApplicationModificationServiceDu' => Service\ModificationServiceDu::class,
Service\CampagneSaisieService::class => Service\CampagneSaisieService::class,
'assertionService' => Assertion\ServiceAssertion::class,
'processusService' => Processus\ServiceProcessus::class,
'processusServiceReferentiel' => Processus\ServiceReferentielProcessus::class,
],
],
'hydrators' => [
......
......@@ -3,28 +3,28 @@
namespace Application;
return [
'router' => [
'router' => [
'routes' => [
'structure' => [
'type' => 'Literal',
'options' => [
'route' => '/structure',
'type' => 'Literal',
'options' => [
'route' => '/structure',
'defaults' => [
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Structure',
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'StructureService',
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
'modifier' => [
'child_routes' => [
'modifier' => [
'type' => 'Segment',
'options' => [
'route' => '/modifier/:id',
'route' => '/modifier/:id',
'constraints' => [
'id' => '[0-9]*',
],
'defaults' => [
'defaults' => [
'action' => 'modifier',
],
],
......@@ -38,15 +38,15 @@ return [
],
],
],
'default' => [
'default' => [
'type' => 'Segment',
'options' => [
'route' => '/:action[/:id]',
'route' => '/:action[/:id]',
'constraints' => [
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9]*',
],
'defaults' => [
'defaults' => [
'action' => 'index',
],
],
......@@ -55,25 +55,25 @@ return [
],
],
],
'navigation' => [
'navigation' => [
'default' => [
'home' => [
'pages' => [
'structure' => [
'label' => 'Structures',
'title' => "Gestion des structures",
'route' => 'structure',
'visible' => false,
'params' => [
'label' => 'Structures',
'title' => "Gestion des structures",
'route' => 'structure',
'visible' => false,
'params' => [
'action' => 'index',
],
'pages' => [
'pages' => [
'voir' => [
'label' => "Voir",
'title' => "Voir une structure",
'route' => 'structure',
'label' => "Voir",
'title' => "Voir une structure",
'route' => 'structure',
'visible' => false,
'pages' => [],
'pages' => [],
],
],
],
......@@ -81,42 +81,42 @@ return [
],
],
],
'bjyauthorize' => [
'guards' => [
'bjyauthorize' => [
'guards' => [
'BjyAuthorize\Guard\Controller' => [
[
'controller' => 'Application\Controller\Structure',
'action' => ['voir', 'apercevoir'],
'roles' => ['user']
'action' => ['voir', 'apercevoir'],
'roles' => ['user'],
],
[
'controller' => 'Application\Controller\Structure',
'action' => ['index', 'choisir', 'recherche'],
'roles' => ['user']
'action' => ['index', 'choisir', 'recherche'],
'roles' => ['user'],
],
],
],
'resource_providers' => [
'BjyAuthorize\Provider\Resource\Config' => [
'Structure' => [],
'StructureService' => [],
],
],
],
'controllers' => [
'controllers' => [
'invokables' => [
'Application\Controller\Structure' => Controller\StructureController::class,
'Application\Controller\Structure' => Controller\StructureController::class,
],
],
'service_manager' => [
'invokables' => [
'ApplicationPersonnel' => Service\Personnel::class,
'ApplicationStructure' => Service\Structure::class,
'ApplicationTypeStructure' => Service\TypeStructure::class,
]
'ApplicationPersonnel' => Service\Personnel::class,
Service\StructureService::class => Service\StructureService::class,
'ApplicationTypeStructure' => Service\TypeStructure::class,
],
],
'view_helpers' => [
'view_helpers' => [
'invokables' => [
'structure' => View\Helper\StructureViewHelper::class,
'structure' => View\Helper\StructureViewHelper::class,
],
],
];
......@@ -9,10 +9,11 @@ use Application\Entity\Db\TblWorkflow;
use Application\Entity\Db\TypeAgrement;
use Application\Form\Agrement\Traits\SaisieAwareTrait;
use Application\Provider\Privilege\Privileges;
use Application\Service\Traits\AgrementAwareTrait;
use Application\Service\AgrementService;
use Application\Service\Traits\AgrementServiceAwareTrait;
use Application\Service\Traits\IntervenantAwareTrait;
use Application\Service\Traits\ServiceAwareTrait;
use Application\Service\Traits\StructureAwareTrait;
use Application\Service\Traits\StructureServiceAwareTrait;
use Application\Service\Traits\TblAgrementServiceAwareTrait;
use Application\Service\Traits\WorkflowServiceAwareTrait;
use UnicaenApp\View\Model\CsvModel;
......@@ -28,12 +29,12 @@ use Application\Service\Traits\ContextServiceAwareTrait;
class AgrementController extends AbstractController
{
use TblAgrementServiceAwareTrait;
use AgrementAwareTrait;
use AgrementServiceAwareTrait;
use IntervenantAwareTrait;
use ServiceAwareTrait;
use ContextServiceAwareTrait;
use SaisieAwareTrait;
use StructureAwareTrait;
use StructureServiceAwareTrait;
use WorkflowServiceAwareTrait;
......@@ -97,7 +98,7 @@ class AgrementController extends AbstractController
$qb = $this->getServiceTblAgrement()->finderByTypeAgrement($typeAgrement);
$this->getServiceTblAgrement()->finderByIntervenant($intervenant, $qb);
$this->getServiceTblAgrement()->leftJoin('applicationAgrement', $qb, 'agrement', true);
$this->getServiceTblAgrement()->leftJoin(AgrementService::class, $qb, 'agrement', true);
$tas = $this->getServiceTblAgrement()->getList($qb);
/* @var $tas TblAgrement[] */
......
......@@ -5,19 +5,19 @@ namespace Application\Controller;
use Application\Entity\Db\Dotation;
use Application\Entity\Db\Structure;
use Application\Form\Budget\Traits\DotationSaisieFormAwareTrait;
use Application\Service\Traits\AnneeAwareTrait;
use Application\Service\Traits\AnneeServiceAwareTrait;
use Application\Service\Traits\FormuleResultatAwareTrait;
use Application\Entity\Db\TypeRessource;
use Application\Service\Traits\ContextServiceAwareTrait;
use Application\Service\Traits\DotationServiceAwareTrait;
use Application\Service\Traits\MiseEnPaiementAwareTrait;
use Application\Service\Traits\StructureAwareTrait;
use Application\Service\Traits\StructureServiceAwareTrait;
use Application\Service\Traits\TypeRessourceServiceAwareTrait;
use UnicaenApp\View\Model\CsvModel;
use Zend\Form\Element\Select;
use Application\Entity\Db\TypeDotation;
use Application\Service\Traits\TypeDotationServiceAwareTrait;
use Application\Service\Traits\SourceAwareTrait;
use Application\Service\Traits\SourceServiceAwareTrait;
use Application\Exception\DbException;
use Application\Form\Budget\Traits\TypeDotationSaisieFormAwareTrait;
......@@ -27,17 +27,17 @@ use Application\Form\Budget\Traits\TypeDotationSaisieFormAwareTrait;
*/
class BudgetController extends AbstractController
{
use StructureAwareTrait;
use StructureServiceAwareTrait;
use ContextServiceAwareTrait;
use TypeRessourceServiceAwareTrait;
use DotationServiceAwareTrait;
use FormuleResultatAwareTrait;
use DotationSaisieFormAwareTrait;
use AnneeAwareTrait;
use AnneeServiceAwareTrait;
use MiseEnPaiementAwareTrait;
use TypeDotationServiceAwareTrait;
use TypeDotationSaisieFormAwareTrait;
use SourceAwareTrait;
use SourceServiceAwareTrait;
......@@ -269,9 +269,9 @@ class BudgetController extends AbstractController
'intervenant-grade-libelle' => 'Grade',
'intervenant-discipline-code' => 'Discipline intervenant (Code)',
'intervenant-discipline-libelle' => 'Discipline intervenant',
'service-structure-aff-libelle' => 'Structure d\'affectation',
'service-structure-aff-libelle' => 'StructureService d\'affectation',
'service-structure-ens-libelle' => 'Structure d\'enseignement',
'service-structure-ens-libelle' => 'StructureService d\'enseignement',
'groupe-type-formation-libelle' => 'Groupe de type de formation',
'type-formation-libelle' => 'Type de formation',