public function createPaymentSlip(PaymentSlip $paymentSlip)
    {
        $this->paymentSlip = $paymentSlip;

        // Place background image
        if ($paymentSlip->getDisplayBackground()) {
            $this->displayImage($paymentSlip->getSlipBackground());
        }

        $elements = $paymentSlip->getAllElements();

        // Go through all elements, write each line
        foreach ($elements as $elementName => $element) {
            $this->writePaymentSlipLines($elementName, $element);
        }

        $this->paymentSlip = null;

        return $this;
    }
public function createPaymentSlip(PaymentSlip $paymentSlip)
    {
        $this->paymentSlip = $paymentSlip;

        // Place background image
        if ($paymentSlip->getDisplayBackground()) {
            $this->displayImage($paymentSlip->getSlipBackground());
        }

        $elements = $paymentSlip->getAllElements();

        // Go through all elements, write each line
        foreach ($elements as $elementName => $element) {
            $this->writePaymentSlipLines($elementName, $element);
        }

        $this->paymentSlip = null;

        return $this;
    }
public function createPaymentSlip ( PaymentSlip $ paymentSlip ) { $ this -> paymentSlip = $ paymentSlip ; // Place background image if ( $ paymentSlip -> getDisplayBackground ( ) ) { $ this -> displayImage ( $ paymentSlip -> getSlipBackground ( ) ) ; } $ elements = $ paymentSlip -> getAllElements ( ) ; // Go through all elements, write each line foreach ( $ elements as $ elementName => $ element ) { $ this -> writePaymentSlipLines ( $ elementName , $ element ) ; } $ this -> paymentSlip = null ; return $ this ; }
Create a payment slip as a PDF using the PDF engine

@param PaymentSlip $paymentSlip The payment slip to create as PDF.
@return $this The current instance for a fluent interface.
Create a payment slip as a PDF using the PDF engine