generation item envole

This commit is contained in:
afornerot 2019-11-27 14:19:46 +01:00
parent 09e8be7058
commit 92eb9d5942
3 changed files with 324 additions and 29 deletions

View File

@ -8,7 +8,7 @@ INSERT IGNORE INTO `niveau01` (`id`, `label`, `siren`) VALUES
(-100, 'DRAAF', '130007107');
INSERT IGNORE INTO `user` (`id`, `niveau01_id`, `username`, `firstname`, `lastname`, `password`, `email`, `avatar`, `role`,`siren`,`authlevel`) VALUES
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}iSRVumfiVye8+j41aCmpruf4eQAhRoLe
(-100, -100, 'admin', 'Administrateur', 'draaf', '{SSHA}nr/6ZYJbDQlAIrk3ju9hauaxMsRUKzrx
', 'admin@ldapbundle.ac-arno.fr', 'admin.jpg', 'ROLE_ADMIN', '130007107', 'simple');

View File

@ -38,11 +38,23 @@ class InitDataCommand extends ContainerAwareCommand
$em = $this->getContainer()->get('doctrine')->getEntityManager();
$alias =$this->getContainer()->getParameter('alias');
$activate_widadminer = $this->getContainer()->getParameter('activate_widadminer');
$activate_widbalado = $this->getContainer()->getParameter('activate_widbalado');
$activate_widdokuwiki = $this->getContainer()->getParameter('activate_widdokuwiki');
$activate_wideconnect = $this->getContainer()->getParameter('activate_wideconnect');
$activate_widetherhome = $this->getContainer()->getParameter('activate_widetherhome');
$activate_widgepi = $this->getContainer()->getParameter('activate_widgepi');
$activate_widgrr = $this->getContainer()->getParameter('activate_widgrr');
$activate_widkanboard = $this->getContainer()->getParameter('activate_widkanboard');
$activate_widlimesurvey = $this->getContainer()->getParameter('activate_widlimesurvey');
$activate_widmindmaps = $this->getContainer()->getParameter('activate_widmindmaps');
$activate_widmoodle = $this->getContainer()->getParameter('activate_widmoodle');
$activate_widnextcloud = $this->getContainer()->getParameter('activate_widnextcloud');
$activate_widopensondage = $this->getContainer()->getParameter('activate_widopensondage');
$activate_widphpldapadmin = $this->getContainer()->getParameter('activate_widphpldapadmin');
$activate_widpiwik = $this->getContainer()->getParameter('activate_widpiwik');
$activate_widroundcube = $this->getContainer()->getParameter('activate_widroundcube');
$activate_widsacoche = $this->getContainer()->getParameter('activate_widsacoche');
$activate_widwordpress = $this->getContainer()->getParameter('activate_widwordpress');
$activate_websocket = $this->getContainer()->getParameter('websocket_activate');
@ -230,6 +242,183 @@ class InitDataCommand extends ContainerAwareCommand
//== ITEM ===============================================================================================================================================
$output->writeln(' > Creation Item');
$groupall=$em->getRepository('CadolesCoreBundle:Group')->findOneBy(["fgall"=>true]);
// Item Adminer
if($activate_widadminer) {
$widadminer_url =$this->getContainer()->getParameter('widadminer_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-394);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_adminer.png"]);
$entityItem = new Item();
$entityItem->setId(-394);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Adminer');
$entityItem->SetSubtitle("Gestionnaire de Bases de Données");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryadm);
$entityItem->setEssential(true);
$entityItem->setRoles(["ROLE_ADMIN"]);
}
$entityItem->setUrl($widadminer_url);
$em->persist($entityItem);
}
// Item Balado
if($activate_widbalado) {
$widbalado_url =$this->getContainer()->getParameter('widbalado_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-377);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_balado.png"]);
$entityItem = new Item();
$entityItem->setId(-377);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Balado');
$entityItem->SetSubtitle("Enregistrement en ligne et partage ses enregistrements");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widbalado_url);
$em->persist($entityItem);
}
// Item Dokuwiki
if($activate_widdokuwiki) {
$widdokuwiki_url =$this->getContainer()->getParameter('widdokuwiki_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-399);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_dokuwiki.png"]);
$entityItem = new Item();
$entityItem->setId(-399);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Dokuwiki');
$entityItem->SetSubtitle("Création de documentations de toute sorte");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widdokuwiki_url);
$em->persist($entityItem);
}
// Item eConnect
if($activate_wideconnect) {
$wideconnect_url =$this->getContainer()->getParameter('wideconnect_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-376);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_econnect.png"]);
$entityItem = new Item();
$entityItem->setId(-376);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Econnect');
$entityItem->SetSubtitle("Gestion de connecteurs vers d'autres applications");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($wideconnect_url);
$em->persist($entityItem);
}
// Item etherhome
if($activate_widetherhome) {
$widetherhome_url =$this->getContainer()->getParameter('widetherhome_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-382);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_etherhome.png"]);
$entityItem = new Item();
$entityItem->setId(-382);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Etherhome');
$entityItem->SetSubtitle("Gestion de vos pads et de vos calcs collaboratifs");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widetherhome_url);
$em->persist($entityItem);
}
// Item gepi
if($activate_widgepi) {
$widgepi_url =$this->getContainer()->getParameter('widgepi_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-389);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_gepi.png"]);
$entityItem = new Item();
$entityItem->setId(-389);
$entityItem->setRowOrder(0);
$entityItem->setTitle('GEPI');
$entityItem->SetSubtitle("Intégration du logiciel de gestion des notes, absences, cahier de texte");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widgepi_url);
$em->persist($entityItem);
}
// Item grr
if($activate_widgrr) {
$widgrr_url =$this->getContainer()->getParameter('widgrr_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-388);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_grr.png"]);
$entityItem = new Item();
$entityItem->setId(-388);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Grr');
$entityItem->SetSubtitle("Gestion et de Réservations de Ressources");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widgrr_url);
$em->persist($entityItem);
}
// Item kanboard
if($activate_widkanboard) {
$widkanboard_url =$this->getContainer()->getParameter('widkanboard_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-363);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_kanboard.png"]);
$entityItem = new Item();
$entityItem->setId(-363);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Kanboard');
$entityItem->SetSubtitle("Gestion de Projets");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widkanboard_url);
$em->persist($entityItem);
}
// Item Limesurvey
if($activate_widlimesurvey) {
@ -244,14 +433,37 @@ class InitDataCommand extends ContainerAwareCommand
$entityItem->setTitle('Limesurvey');
$entityItem->SetSubtitle("Application de sondage");
$entityItem->setIcon($entityicon);
$entityItem->setColor("328637");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widlimesurvey_url);
$em->persist($entityItem);
}
// Item Mindmaps
if($activate_widmindmaps) {
$widmindmaps_url =$this->getContainer()->getParameter('widmindmaps_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-369);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_mindmaps.png"]);
$entityItem = new Item();
$entityItem->setId(-369);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Mindmaps');
$entityItem->SetSubtitle("Carte Mentale");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widmindmaps_url);
$em->persist($entityItem);
}
// Item Moodle
if($activate_widmoodle) {
$widmoodle_url =$this->getContainer()->getParameter('widmoodle_url');
@ -265,20 +477,43 @@ class InitDataCommand extends ContainerAwareCommand
$entityItem->setTitle('Moodle');
$entityItem->SetSubtitle("Application de eLearning");
$entityItem->setIcon($entityicon);
$entityItem->setColor("f77f11");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widmoodle_url);
$em->persist($entityItem);
}
// Item Nextcloud
if($activate_widnextcloud) {
$widnextcloud_url =$this->getContainer()->getParameter('widnextcloud_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-366);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_nextcloud.png"]);
$entityItem = new Item();
$entityItem->setId(-366);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Nextcloud');
$entityItem->SetSubtitle("Stockage de Fichiers");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widnextcloud_url);
$em->persist($entityItem);
}
// Item Opensondage
if($activate_widopensondage) {
$widopensondage_url =$this->getContainer()->getParameter('widopensondage_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-383);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_calendar.png"]);
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_opensondage.png"]);
$entityItem = new Item();
$entityItem->setId(-383);
@ -286,20 +521,43 @@ class InitDataCommand extends ContainerAwareCommand
$entityItem->setTitle('Opensondage');
$entityItem->SetSubtitle("Application de Sondage par Date");
$entityItem->setIcon($entityicon);
$entityItem->setColor("1ba39c");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widopensondage_url);
$em->persist($entityItem);
}
// Item phpLdapAdmin
if($activate_widphpldapadmin) {
$widphpldapadmin_url =$this->getContainer()->getParameter('widphpldapadmin_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-362);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_phpldapadmin.png"]);
$entityItem = new Item();
$entityItem->setId(-362);
$entityItem->setRowOrder(0);
$entityItem->setTitle('PhpLdapAdmin');
$entityItem->SetSubtitle("Gestionnaire dannuaire LDAP");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryadm);
$entityItem->setEssential(true);
$entityItem->setRoles(["ROLE_ADMIN"]);
}
$entityItem->setUrl($widphpldapadmin_url);
$em->persist($entityItem);
}
// Item Piwik
if($activate_widpiwik) {
$widpiwik_url =$this->getContainer()->getParameter('widpiwik_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-380);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_trends.png"]);
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_piwik.png"]);
$entityItem = new Item();
$entityItem->setId(-380);
@ -307,14 +565,59 @@ class InitDataCommand extends ContainerAwareCommand
$entityItem->setTitle('Piwik');
$entityItem->SetSubtitle("Application de Statistique de Visite");
$entityItem->setIcon($entityicon);
$entityItem->setColor("1ba39c");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryadm);
$entityItem->setEssential(true);
$entityItem->setRoles(["ROLE_ADMIN"]);
}
$entityItem->setUrl($widpiwik_url);
$em->persist($entityItem);
}
// Item Roundcube
if($activate_widroundcube) {
$widroundcube_url =$this->getContainer()->getParameter('widroundcube_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-398);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_roundcube.png"]);
$entityItem = new Item();
$entityItem->setId(-398);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Roundcube');
$entityItem->SetSubtitle("Application de Statistique de Visite");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widroundcube_url);
$em->persist($entityItem);
}
// Item Sacoche
if($activate_widsacoche) {
$widsacoche_url =$this->getContainer()->getParameter('widsacoche_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-372);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_sacoche.png"]);
$entityItem = new Item();
$entityItem->setId(-372);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Sacoche');
$entityItem->SetSubtitle("Evaluation de compétences");
$entityItem->setIcon($entityicon);
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widsacoche_url);
$em->persist($entityItem);
}
// Item Wordpress
if($activate_widwordpress) {
$widwordpress_url =$this->getContainer()->getParameter('widwordpress_url');
@ -328,35 +631,16 @@ class InitDataCommand extends ContainerAwareCommand
$entityItem->setTitle('Wordpress');
$entityItem->SetSubtitle("Application de Blog");
$entityItem->setIcon($entityicon);
$entityItem->setColor("96281b");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
$entityItem->setEssential(true);
$entityItem->addGroup($groupall);
}
$entityItem->setUrl($widwordpress_url);
$em->persist($entityItem);
}
// Item Nextcloud
if($activate_widnextcloud) {
$widnextcloud_url =$this->getContainer()->getParameter('widnextcloud_url');
$entityItem = $em->getRepository('CadolesPortalBundle:Item')->find(-366);
if(!$entityItem) {
$entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_nextcloud.png"]);
$entityItem = new Item();
$entityItem->setId(-366);
$entityItem->setRowOrder(0);
$entityItem->setTitle('Nextcloud');
$entityItem->SetSubtitle("Stockage de Fichiers");
$entityItem->setIcon($entityicon);
$entityItem->setColor("f15a22");
$entityItem->setTarget("_blank");
$entityItem->setItemcategory($entityItemcategoryapp);
}
$entityItem->setUrl($widnextcloud_url);
$em->persist($entityItem);
}
//== WIDGET ============================================================================================================================================
$output->writeln(' > Creation Widget');

View File

@ -325,6 +325,17 @@ parameters:
activate_widwordpress: false
%end if
%if %%getVar("activer_sondepiwik_local", 'non') == "oui"
activate_widsonde: true
widsonde_url: /sondepiwik/envoleTrackeur.js.php
%else if %%getVar("activer_piwik", 'non') == "oui"
activate_widsonde: true
widsonde_url: /piwik/envoleTrackeur.js.php
%else
activate_widsonde: false
widsonde_url:
%end if
# Si mode_auth = CAS
cas_host: %%eolesso_adresse
cas_path: %%eolesso_cas_folder