protected function writePaymentSlipLines($elementName, array $element)
    {
        if (!is_string($elementName)) {
            throw new \InvalidArgumentException('$elementName is not a string!');
        }
        if (!isset($element['lines'])) {
            throw new \InvalidArgumentException('$element contains not "lines" key!');
        }
        if (!isset($element['attributes'])) {
            throw new \InvalidArgumentException('$element contains not "attributes" key!');
        }
        $lines = $element['lines'];
        $attributes = $element['attributes'];

        if (!is_array($lines)) {
            throw new \InvalidArgumentException('$lines is not an array!');
        }
        if (!is_array($attributes)) {
            throw new \InvalidArgumentException('$attributes is not an array!');
        }

        $posX = $attributes['PosX'];
        $posY = $attributes['PosY'];
        $height = $attributes['Height'];
        $width = $attributes['Width'];
        $fontFamily = $attributes['FontFamily'];
        $background = $attributes['Background'];
        $fontSize = $attributes['FontSize'];
        $fontColor = $attributes['FontColor'];
        $lineHeight = $attributes['LineHeight'];
        $textAlign = $attributes['TextAlign'];

        $this->setFont($fontFamily, $fontSize, $fontColor);
        if ($background != 'transparent') {
            $this->setBackground($background);
            $fill = true;
        } else {
            $fill = false;
        }

        foreach ($lines as $lineNr => $line) {
            $this->setPosition(
                $this->paymentSlip->getSlipPosX() + $posX,
                $this->paymentSlip->getSlipPosY() + $posY + ($lineNr * $lineHeight)
            );
            $this->createCell($width, $height, $line, $textAlign, $fill);
        }

        return $this;
    }
protected function writePaymentSlipLines($elementName, array $element)
    {
        if (!is_string($elementName)) {
            throw new \InvalidArgumentException('$elementName is not a string!');
        }
        if (!isset($element['lines'])) {
            throw new \InvalidArgumentException('$element contains not "lines" key!');
        }
        if (!isset($element['attributes'])) {
            throw new \InvalidArgumentException('$element contains not "attributes" key!');
        }
        $lines = $element['lines'];
        $attributes = $element['attributes'];

        if (!is_array($lines)) {
            throw new \InvalidArgumentException('$lines is not an array!');
        }
        if (!is_array($attributes)) {
            throw new \InvalidArgumentException('$attributes is not an array!');
        }

        $posX = $attributes['PosX'];
        $posY = $attributes['PosY'];
        $height = $attributes['Height'];
        $width = $attributes['Width'];
        $fontFamily = $attributes['FontFamily'];
        $background = $attributes['Background'];
        $fontSize = $attributes['FontSize'];
        $fontColor = $attributes['FontColor'];
        $lineHeight = $attributes['LineHeight'];
        $textAlign = $attributes['TextAlign'];

        $this->setFont($fontFamily, $fontSize, $fontColor);
        if ($background != 'transparent') {
            $this->setBackground($background);
            $fill = true;
        } else {
            $fill = false;
        }

        foreach ($lines as $lineNr => $line) {
            $this->setPosition(
                $this->paymentSlip->getSlipPosX() + $posX,
                $this->paymentSlip->getSlipPosY() + $posY + ($lineNr * $lineHeight)
            );
            $this->createCell($width, $height, $line, $textAlign, $fill);
        }

        return $this;
    }
protected function writePaymentSlipLines ( $ elementName , array $ element ) { if ( ! is_string ( $ elementName ) ) { throw new \ InvalidArgumentException ( '$elementName is not a string!' ) ; } if ( ! isset ( $ element [ 'lines' ] ) ) { throw new \ InvalidArgumentException ( '$element contains not "lines" key!' ) ; } if ( ! isset ( $ element [ 'attributes' ] ) ) { throw new \ InvalidArgumentException ( '$element contains not "attributes" key!' ) ; } $ lines = $ element [ 'lines' ] ; $ attributes = $ element [ 'attributes' ] ; if ( ! is_array ( $ lines ) ) { throw new \ InvalidArgumentException ( '$lines is not an array!' ) ; } if ( ! is_array ( $ attributes ) ) { throw new \ InvalidArgumentException ( '$attributes is not an array!' ) ; } $ posX = $ attributes [ 'PosX' ] ; $ posY = $ attributes [ 'PosY' ] ; $ height = $ attributes [ 'Height' ] ; $ width = $ attributes [ 'Width' ] ; $ fontFamily = $ attributes [ 'FontFamily' ] ; $ background = $ attributes [ 'Background' ] ; $ fontSize = $ attributes [ 'FontSize' ] ; $ fontColor = $ attributes [ 'FontColor' ] ; $ lineHeight = $ attributes [ 'LineHeight' ] ; $ textAlign = $ attributes [ 'TextAlign' ] ; $ this -> setFont ( $ fontFamily , $ fontSize , $ fontColor ) ; if ( $ background != 'transparent' ) { $ this -> setBackground ( $ background ) ; $ fill = true ; } else { $ fill = false ; } foreach ( $ lines as $ lineNr => $ line ) { $ this -> setPosition ( $ this -> paymentSlip -> getSlipPosX ( ) + $ posX , $ this -> paymentSlip -> getSlipPosY ( ) + $ posY + ( $ lineNr * $ lineHeight ) ) ; $ this -> createCell ( $ width , $ height , $ line , $ textAlign , $ fill ) ; } return $ this ; }
Write the lines of an element to the PDf

@param string $elementName The name of the element.
@param array $element The element.
@return $this The current instance for a fluent interface.
Write the lines of an element to the PDf