pyrex-fwi/plantuml

Some plantuml poc

v0.1.1 2020-12-24 10:40 UTC

This package is auto-updated.

Last update: 2024-04-05 21:33:00 UTC


README

This package allow WBS creation

Getting started

Install

composer req --dev pyrex-fwi/plantuml

Sample usages

Sample 1

#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-1

Show or edit on planttext

Sample 2

#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

test-2

Show or edit on planttext

Useful links