Merge branch 'master' into dist/envole/6/master

This commit is contained in:
Arnaud Fornerot 2021-02-24 17:01:12 +01:00
commit 0904f306ce

View File

@ -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();