This package allow WBS creation
composer req --dev pyrex-fwi/plantuml
#test-1.php
<?php
//create document
$wbs = new WorkBreakdownStructure('RootNode');
//add subitems
$wbs->addNode(new Node('Node A'));
$wbs->addNode(new Node('Node B'));
$wbs->addNode(new Node('Node C'));
//get document as plantuml string
echo $wbs->getDocumentContent();
php test-1.php > test-1.plantuml
#test-1.plantuml
@startwbs
<style>
//...
</style>
* RootNode
** Node A
** Node B
** Node C
@endwbs
#test-2.php
<?php
//create document
$wbs = new WorkBreakdownStructure('RootNode');
//add subitems
$nodes[] = new Node('Node A');
$nodes[] = new Node('Node B');
$nodes[] = new Node('Node C');
$nodes[1]
->addChild(new Node('Sub B.1'))
->addChild(
(new Node('Sub B.B'))
->setToLeftPosition()
->setInlineColor('green')
)
->setInlineColor('lightgray')
;
$wbs
->addChildrenNodes($nodes)
->getRootNode()
->setInlineColor('pink');
echo $wbs->getDocumentContent();
php test-2.php > test-2.plantuml
#test-2.plantuml
@startwbs
*[#pink] RootNode
** Node A
**[#lightgray] Node B
*** Sub B.1
***[#green]< Sub B.B //#This part not work at 22/12/20
** Node C
@endwbs