diff --git a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php index a68c378b..a640b5ec 100644 --- a/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php +++ b/src/ninegate-1.0/src/Cadoles/PortalBundle/Command/InitDataCommand.php @@ -1470,6 +1470,30 @@ class InitDataCommand extends ContainerAwareCommand $em->remove($entityWidget); } + // Dokuwiki + $entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1780); + if($activate_widdokuwiki) { + if(!$entityWidget) $entityWidget = new Widget(); + $entityicon = $em->getRepository('CadolesPortalBundle:Icon')->findoneby(["label"=>"uploads/icon/icon_dokuwiki.png"]); + $entityWidget->setId(-1780); + $entityWidget->setRoworder(0); + $entityWidget->setIcon($entityicon); + $entityWidget->setName('Dokuwiki'); + $entityWidget->setDescription("Plan de votre dokuwiki"); + $entityWidget->setRouteview("cadoles_portal_config_panelwidget_view_urlfixe"); + $entityWidget->setHeight("630"); + $entityWidget->setAutoajust(false); + $entityWidget->setBorder(false); + $entityWidget->setOpened(true); + $entityWidget->setAccess(["config","user","group"]); + $parameter = json_decode('{"fields": [{"id": "url", "loc": "col1", "type": "hidden", "label": "URL", "value": "'.$widdokuwiki_url.'/widgetdokuwiki.php", "mandatory": "true"}]}'); + $entityWidget->setParameter($parameter); + $em->persist($entityWidget); + } + elseif($entityWidget) { + $em->remove($entityWidget); + } + // Widget Séparateur $entityWidget = $em->getRepository('CadolesPortalBundle:Widget')->find(-1600); if(!$entityWidget) $entityWidget = new Widget();