mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Dashlet extraction
This commit is contained in:
@@ -704,6 +704,9 @@ PHP;
|
||||
$oPropertyTypesNode = $this->oFactory->GetNodes('/itop_design/meta/property_types')->item(0);
|
||||
$this->CompilePropertyTypes($oPropertyTypesNode, $sTempTargetDir, $sFinalTargetDir);
|
||||
|
||||
$oDashletNode = $this->oFactory->GetNodes('/itop_design/meta/dashlets')->item(0);
|
||||
$this->CompileDashlets($oDashletNode, $sTempTargetDir, $sFinalTargetDir);
|
||||
|
||||
// Compile the XML parameters
|
||||
/** @var \MFElement $oParametersNode */
|
||||
$oParametersNode = $this->oFactory->GetNodes('/itop_design/module_parameters')->item(0);
|
||||
@@ -3592,6 +3595,16 @@ EOF;
|
||||
}
|
||||
}
|
||||
|
||||
protected function CompileDashlets(?DOMNode $oDashlets, string $sTempTargetDir, string $sFinalTargetDir): void
|
||||
{
|
||||
if ($oDashlets) {
|
||||
$oDoc = new DesignDocument();
|
||||
$oClone = $oDoc->importNode($oDashlets->cloneNode(true), true);
|
||||
$oDoc->appendChild($oClone);
|
||||
$oDoc->save($sTempTargetDir.'/core/dashlets.xml');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \DOMFormatException
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user