PlantUML diagrams

In order to render diagrams in the TYPO3 documentation, PlantUML is integrated into the rendering process.

Embedded UML diagrams

Simple diagrams can be embedded directly into the reStructuredText markup:

Documentation/SomeFile.rst
..  uml::
    :caption: Some Caption

    class -> otherClass : message

This will be rendered as:

class -> otherClass : message

Some Caption

Include a PlantUML file

Documentation/SomeFile.rst
..  uml:: _complex_uml.plantuml
    :align: center
    :caption: Figure 1-1: Application flow
    :width: 1000

This will be rendered as:

enum FeedFormat {
  ATOM
  JSON
  RSS
}

interface AuthorInterface
interface CategoryInterface
interface FeedInterface
interface FeedFormatAwareInterface
interface ImageInterface
interface ItemInterface
interface RequestAwareInterface

class Author
class Image
class Item

class YourFeed
note left: This is your feed implementation class

YourFeed -[hidden]> FeedFormat

Author <|.. AuthorInterface
Category <|.. CategoryInterface
Image <|.. ImageInterface
Item <|.. ItemInterface

FeedInterface ..|> YourFeed : required
FeedFormatAwareInterface ..|> YourFeed : optional
RequestAwareInterface ..|> YourFeed : optional

Item "1" *-- "0 .. n" Author : contains

YourFeed "1" *-- "0 .. n" Author : contains
YourFeed "1" *-- "0 .. n" Category : contains
YourFeed "1" *-- "0 .. 1" Image : contains
YourFeed "1" *-- "0 .. n" Item : contains
YourFeed .. FeedFormat : used in attributes

Figure 1-1: Application flow

Put a file called _complex_uml.plantuml in the same directory as the reST file:

Documentation/_complex_uml.plantuml
enum FeedFormat {
  ATOM
  JSON
  RSS
}

interface AuthorInterface
interface CategoryInterface
interface FeedInterface
interface FeedFormatAwareInterface
interface ImageInterface
interface ItemInterface
interface RequestAwareInterface

class Author
class Image
class Item

class YourFeed
note left: This is your feed implementation class

YourFeed -[hidden]> FeedFormat

Author <|.. AuthorInterface
Category <|.. CategoryInterface
Image <|.. ImageInterface
Item <|.. ItemInterface

FeedInterface ..|> YourFeed : required
FeedFormatAwareInterface ..|> YourFeed : optional
RequestAwareInterface ..|> YourFeed : optional

Item "1" *-- "0 .. n" Author : contains

YourFeed "1" *-- "0 .. n" Author : contains
YourFeed "1" *-- "0 .. n" Category : contains
YourFeed "1" *-- "0 .. 1" Image : contains
YourFeed "1" *-- "0 .. n" Item : contains
YourFeed .. FeedFormat : used in attributes