Zum Inhalt springen

API reference / Quittio \ Core \ Rendering

PendingDocument

final class in quittio/core

Quittio\Core\Rendering\PendingDocument · Source

Fluent render call for documents: Quittio::document($quote)->locale('de')->render().

Methods#

MethodDescription
->__construct()
->country()Leading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.
->htmlOnly()Renders the template only, without PDF (format "html").
->locale()Locale of this call; wins over the document locale and the configuration.
->option()Output option of this call, e.g. option('fold_marks', false); see the output configuration.
->presentation()Design defaults of this call; the document's own presentation wins.
->render()Calculates and renders the document, see Quittio::renderDocument().
->template()Template of this call; the same selection rules as for invoices.

__construct()#

public function __construct(Quittio $quittio, DocumentData $data)
ParameterTypeDescription
$quittioQuittio
$dataDocumentData

country()#

public function country(string $country): self

Leading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.

ParameterTypeDescription
$countrystring
Returns
self

htmlOnly()#

public function htmlOnly(): self

Renders the template only, without PDF (format "html").

Returns
self

locale()#

public function locale(string $locale): self

Locale of this call; wins over the document locale and the configuration.

ParameterTypeDescription
$localestring
Returns
self

option()#

public function option(string $key, mixed $value): self

Output option of this call, e.g. option('fold_marks', false); see the output configuration.

ParameterTypeDescription
$keystring
$valuemixed
Returns
self

presentation()#

public function presentation(Presentation $presentation): self

Design defaults of this call; the document's own presentation wins.

ParameterTypeDescription
$presentationPresentation
Returns
self

render()#

public function render(): RenderedDocument

Calculates and renders the document, see Quittio::renderDocument().

Returns
RenderedDocument
Throws
CalculationException – when the document cannot be calculated
Throws
PdfException – when the PDF cannot be rendered

template()#

public function template(string $template): self

Template of this call; the same selection rules as for invoices.

ParameterTypeDescription
$templatestring
Returns
self

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.