Skip to content

API reference / Quittio \ Laravel \ Rendering

PendingDocument

final class in quittio/laravel · uses Illuminate\Support\Traits\Macroable

Quittio\Laravel\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.
->data()The document of this call, as passed (not calculated).
->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.
->options()The options collected so far, as passed to the render run.
->presentation()Design defaults of this call; the document's own presentation wins.
->queue()Renders in a queued job: Quittio::document($quote)->queue()->save('documents', $path).
->render()Calculates and renders the document with the events DocumentRendering and DocumentRendered, see Quittio::renderDocument().
->template()Template of this call; the same selection rules as for invoices.

__construct()#

public function __construct(QuittioManager $manager, DocumentData $data)
ParameterTypeDescription
$managerQuittioManager
$dataDocumentData

country()#

public function country(string $country): static

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

ParameterTypeDescription
$countrystring
Returns
static

data()#

public function data(): DocumentData

The document of this call, as passed (not calculated).

Returns
DocumentData

htmlOnly()#

public function htmlOnly(): static

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

Returns
static

locale()#

public function locale(string $locale): static

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

ParameterTypeDescription
$localestring
Returns
static

option()#

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

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

ParameterTypeDescription
$keystring
$valuemixed
Returns
static

options()#

public function options(): RenderOptions

The options collected so far, as passed to the render run.

Returns
RenderOptions

presentation()#

public function presentation(Presentation $presentation): static

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

ParameterTypeDescription
$presentationPresentation
Returns
static

queue()#

public function queue(?string $connection = null, ?string $queue = null): QueuedDocument

Renders in a queued job: Quittio::document($quote)->queue()->save('documents', $path).

ParameterTypeDescription
$connection?string = null
$queue?string = null
Returns
QueuedDocument

render()#

public function render(): RenderedDocument

Calculates and renders the document with the events DocumentRendering and DocumentRendered, 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): static

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

ParameterTypeDescription
$templatestring
Returns
static

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.