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#
| Method | Description |
|---|---|
->__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)| Parameter | Type | Description |
|---|---|---|
$quittio | Quittio | |
$data | DocumentData |
country()#
public function country(string $country): selfLeading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.
| Parameter | Type | Description |
|---|---|---|
$country | string |
- Returns
self
htmlOnly()#
public function htmlOnly(): selfRenders the template only, without PDF (format "html").
- Returns
self
locale()#
public function locale(string $locale): selfLocale of this call; wins over the document locale and the configuration.
| Parameter | Type | Description |
|---|---|---|
$locale | string |
- Returns
self
option()#
public function option(string $key, mixed $value): selfOutput option of this call, e.g. option('fold_marks', false); see the output configuration.
| Parameter | Type | Description |
|---|---|---|
$key | string | |
$value | mixed |
- Returns
self
presentation()#
public function presentation(Presentation $presentation): selfDesign defaults of this call; the document's own presentation wins.
| Parameter | Type | Description |
|---|---|---|
$presentation | Presentation |
- Returns
self
render()#
public function render(): RenderedDocumentCalculates 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): selfTemplate of this call; the same selection rules as for invoices.
| Parameter | Type | Description |
|---|---|---|
$template | string |
- Returns
self