---
title: "RenderOptions – API-Referenz · Quittio"
description: "Per call options of a render run; unset values fall back to the configuration."
canonical_url: "https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions"
locale: de
meta:
  "og:description": "Per call options of a render run; unset values fall back to the configuration."
  "og:image": "https://quittio.dev/og/quittio-de.jpg"
  "og:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
  "og:image:height": "630"
  "og:image:type": image/jpeg
  "og:image:width": "1200"
  "og:title": "RenderOptions – API-Referenz · Quittio"
  "twitter:image": "https://quittio.dev/og/quittio-de.jpg"
  "twitter:image:alt": "Quittio: E-Rechnungen für PHP und Laravel. Rechtssicher, validiert, archiviert, mit geprüfter Beispielrechnung."
---

> Index of every page on this site: [llms.txt](https://quittio.dev/llms.txt)

[API reference](https://quittio.dev/docs/api) / [Quittio](https://quittio.dev/docs/api/Quittio) \\ [Core](https://quittio.dev/docs/api/Quittio/Core) \\ [Rendering](https://quittio.dev/docs/api/Quittio/Core/Rendering)

# RenderOptions

final readonly class in quittio/core

`Quittio\Core\Rendering\RenderOptions` · [Source](https://github.com/Quittio/quittio/blob/v0.7.1/packages/core/src/Rendering/RenderOptions.php#L16)

Per call options of a render run; unset values fall back to the configuration.

## Constants \#

| Constant | Value | Description |
| --- | --- | --- |
| `ARRAY_VERSION` | `1` | Version of the array format of toArray(). |

## Properties \#

| Property | Type | Description |
| --- | --- | --- |
| `$country` readonly | `?string` | |
| `$formats` readonly | `list<string>` | empty = configured or automatically chosen format |
| `$locale` readonly | `?string` | |
| `$options` readonly | `array<string, mixed>` | |
| `$presentation` readonly | `? [Presentation](https://quittio.dev/docs/api/Quittio/Core/Data/Presentation/Presentation)` | |
| `$profile` readonly | `[Profile](https://quittio.dev/docs/api/Quittio/Core/Profiles/Profile)\|string\|null` | |
| `$template` readonly | `?string` | |
| `$validation` readonly | `?string` | |

## Methods \#

| Method | Description |
| --- | --- |
| `->__construct()` | |
| `::fromArray()` | |
| `->toArray()` | The options as array of scalars, e.g. for a queued job; fromArray() restores them. A profile object is stored by its key, so it must be registered where the array is read. |

### `__construct()`#

```
public function __construct(
    list<string> $formats = [],
    Profile|string|null $profile = null,
    ?string $template = null,
    ?string $locale = null,
    ?string $country = null,
    ?string $validation = null,
    ?Presentation $presentation = null,
    array<string, mixed> $options = [],
)
```

| Parameter | Type | Description |
| --- | --- | --- |
| `$formats` | `list<string>` = `[]` | empty = configured or automatically chosen format |
| `$profile` | `[Profile](https://quittio.dev/docs/api/Quittio/Core/Profiles/Profile)\|string\|null` = `null` | |
| `$template` | `?string` = `null` | |
| `$locale` | `?string` = `null` | |
| `$country` | `?string` = `null` | |
| `$validation` | `?string` = `null` | |
| `$presentation` | `? [Presentation](https://quittio.dev/docs/api/Quittio/Core/Data/Presentation/Presentation)` = `null` | |
| `$options` | `array<string, mixed>` = `[]` | |

### `fromArray()`#

```
public static function fromArray(array<array-key, mixed> $data): self
```

static

| Parameter | Type | Description |
| --- | --- | --- |
| `$data` | `array<array-key, mixed>` | an array of toArray() |

<dl><dt>Returns</dt>
<dd><code>self</code></dd>
<dt>Throws</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Exceptions/InvalidArgumentException">InvalidArgumentException</a></code> – for an unknown version or invalid values</dd></dl>

### `toArray()`#

```
public function toArray(): array{_version: int, formats: list<string>, profile: ?string, template: ?string, locale: ?string, country: ?string, validation: ?string, presentation: ?array<string, mixed>, options: array<string, mixed>}
```

The options as array of scalars, e.g. for a queued job; fromArray() restores them. A profile object is stored by its key, so it must be registered where the array is read.

<dl><dt>Returns</dt>
<dd><code>array{_version: int, formats: list&lt;string&gt;, profile: ?string, template: ?string, locale: ?string, country: ?string, validation: ?string, presentation: ?array&lt;string, mixed&gt;, options: array&lt;string, mixed&gt;}</code></dd>
<dt>Throws</dt>
<dd><code><a href="https://quittio.dev/docs/api/Quittio/Core/Exceptions/InvalidArgumentException">InvalidArgumentException</a></code> – when an option is not a scalar, null or an array of them</dd></dl>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://quittio.dev/#website","@type":"WebSite","description":"E-Rechnungen für PHP und Laravel: ZUGFeRD, XRechnung und Peppol erstellen, prüfen, lesen und archivieren.","inLanguage":"de-DE","name":"Quittio","url":"https://quittio.dev/","publisher":{"@id":"https://quittio.dev/#identity"},"workTranslation":{"@id":"https://quittio.dev/en#website"}},{"@id":"https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions#webpage","@type":"WebPage","description":"Per call options of a render run; unset values fall back to the configuration.","name":"RenderOptions – API-Referenz","url":"https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions","isPartOf":{"@id":"https://quittio.dev/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://quittio.dev/docs/api/Quittio/Core/Rendering/RenderOptions"]}],"primaryImageOfPage":{"@id":"https://quittio.dev/#logo"}},{"@id":"https://quittio.dev/#identity","@type":"Organization","description":"Open-Source-Bibliothek für E-Rechnungen in PHP und Laravel (ZUGFeRD, XRechnung, Peppol) und Quittio Managed.","email":"kontakt@niklasforst.de","legalName":"Niklas Forst – Softwareentwicklung","name":"Quittio","url":"https://quittio.dev","founder":{"@type":"Person","name":"Niklas Forst","url":"https://quittio.dev/ueber"},"logo":{"@id":"https://quittio.dev/#logo"},"sameAs":["https://github.com/Quittio/quittio","https://packagist.org/packages/quittio/quittio"]},{"@id":"https://quittio.dev/#logo","@type":"ImageObject","caption":"Quittio","contentUrl":"https://quittio.dev/logo.png","inLanguage":"de-DE","url":"https://quittio.dev/logo.png"}]}
```