public function add(Component $element)
    {
        $this->elements[] = $element;
        $this->indentations[] = $this->currentIndentation;

        if ($element instanceof LabeledParagraph) {
            $this->alignment->add($element, $this->currentIndentation);
            $element->setAlignment($this->alignment);
        }

        return $this;
    }
public function add(Component $element)
    {
        $this->elements[] = $element;
        $this->indentations[] = $this->currentIndentation;

        if ($element instanceof LabeledParagraph) {
            $this->alignment->add($element, $this->currentIndentation);
            $element->setAlignment($this->alignment);
        }

        return $this;
    }
public function add ( Component $ element ) { $ this -> elements [ ] = $ element ; $ this -> indentations [ ] = $ this -> currentIndentation ; if ( $ element instanceof LabeledParagraph ) { $ this -> alignment -> add ( $ element , $ this -> currentIndentation ) ; $ element -> setAlignment ( $ this -> alignment ) ; } return $ this ; }
Adds a renderable element to the layout.

@param Component $element The element to add.

@return static The current instance.
Adds a renderable element to the layout .