use custom fonts in mpdf via twig template (#3509)

This commit is contained in:
Alexander Pankow
2022-09-04 00:58:54 +02:00
committed by GitHub
parent 3f4f63dc33
commit a04b72e866
8 changed files with 104 additions and 11 deletions

View File

@@ -14,19 +14,34 @@ namespace App\Export;
*/
final class ExportContext
{
/**
* @var array
*/
private $options = [];
public function setOption(string $key, string $value): void
/**
* @param string $key
* @param string|array $value
* @return void
*/
public function setOption(string $key, $value): void
{
$this->options[$key] = $value;
}
/**
* @return array
*/
public function getOptions(): array
{
return $this->options;
}
public function getOption(string $key): ?string
/**
* @param string $key
* @return array|string|null
*/
public function getOption(string $key)
{
if (\array_key_exists($key, $this->options)) {
return $this->options[$key];