[uml] IBlock

Webel module:


UML element type:

OOE stereotypes:

Relationships (inverse)
UML Diagram
Click on the UML diagram to view it in a lightbox image viewer. You may then zoom in (or just open the image in a new web browser tab using the Download Original link to view large diagrams).

UML diagram type:

UML modelling domain:


Consider Enum StatusKind (interim solution, BlockStatusKind with consts)

Consider Visibility enum matching BLOCK_VISIBLITY_.. (interim solution, BlockVisibilityKind with consts)

Consider Cache enum (interim solution, BlockCacheKind with consts)

? how check $cache is bitmask

Iff exactly same Cache options used elsewhere promote to DrupalCacheKind.

Consider addProperty(IProperty)

One would not usually show so many related wrapper Components in an analysis interface diagram, however the Enum-like encapsulators of permitted values for $cache, $visibility, and $status are relevant here. For the moment they are represented as static constant attributes of wrapper Components, however one could also model them as literals of UML Enumerations.

There are many strategies for imitating Enums in PHP , but until a decision is made about which way to go, it at least helps to have some encapsulation of allowed values as shown. See also the code example below:

Code examples
  public function block_info() {
    $blockSet = $this->factory()->newBlockSet();
    $block_current_posts = $this->factory()->newBlock(
            $this->getModuleDisplayName() . ': Current posts');
    $block_demo = $this->factory()->newBlock(
            $this->getModuleDisplayName() . ': Demo block');
    return $blockSet->get();
Visit also