diff --git a/app/Contribution/Documents/BdkjHesse.php b/app/Contribution/Documents/BdkjHesse.php index f6170678..00f7bef6 100644 --- a/app/Contribution/Documents/BdkjHesse.php +++ b/app/Contribution/Documents/BdkjHesse.php @@ -3,15 +3,18 @@ namespace App\Contribution\Documents; use App\Contribution\Data\MemberData; +use App\Contribution\Traits\HasPdfBackground; use App\Country; use Carbon\Carbon; use Illuminate\Support\Collection; -use Illuminate\Support\Str; use Zoomyboy\Tex\Engine; use Zoomyboy\Tex\Template; class BdkjHesse extends ContributionDocument { + + use HasPdfBackground; + /** * @param Collection> $members */ @@ -132,11 +135,6 @@ class BdkjHesse extends ContributionDocument return $this; } - public function getEngine(): Engine - { - return Engine::PDFLATEX; - } - public static function getName(): string { return 'BDKJ Hessen'; diff --git a/app/Contribution/Documents/CityFrankfurtMainDocument.php b/app/Contribution/Documents/CityFrankfurtMainDocument.php index 9d33951a..05c58205 100644 --- a/app/Contribution/Documents/CityFrankfurtMainDocument.php +++ b/app/Contribution/Documents/CityFrankfurtMainDocument.php @@ -3,16 +3,17 @@ namespace App\Contribution\Documents; use App\Contribution\Data\MemberData; +use App\Contribution\Traits\HasPdfBackground; use App\Country; use App\Invoice\InvoiceSettings; use Carbon\Carbon; use Illuminate\Support\Collection; -use Illuminate\Support\Str; -use Zoomyboy\Tex\Engine; use Zoomyboy\Tex\Template; class CityFrankfurtMainDocument extends ContributionDocument { + use HasPdfBackground; + public string $fromName; /** @@ -120,11 +121,6 @@ class CityFrankfurtMainDocument extends ContributionDocument return $this; } - public function getEngine(): Engine - { - return Engine::PDFLATEX; - } - public static function getName(): string { return 'Frankfurt'; diff --git a/app/Contribution/Documents/CityRemscheidDocument.php b/app/Contribution/Documents/CityRemscheidDocument.php index 56a37bfc..9a84e4f4 100644 --- a/app/Contribution/Documents/CityRemscheidDocument.php +++ b/app/Contribution/Documents/CityRemscheidDocument.php @@ -3,15 +3,17 @@ namespace App\Contribution\Documents; use App\Contribution\Data\MemberData; +use App\Contribution\Traits\HasPdfBackground; use App\Country; use App\Member\Member; use Carbon\Carbon; use Illuminate\Support\Collection; -use Zoomyboy\Tex\Engine; use Zoomyboy\Tex\Template; class CityRemscheidDocument extends ContributionDocument { + use HasPdfBackground; + /** * @param Collection> $leaders * @param Collection> $children @@ -94,11 +96,6 @@ class CityRemscheidDocument extends ContributionDocument return $this; } - public function getEngine(): Engine - { - return Engine::PDFLATEX; - } - public static function getName(): string { return 'Remscheid'; diff --git a/app/Contribution/Documents/CitySolingenDocument.php b/app/Contribution/Documents/CitySolingenDocument.php index 42864fe9..054adc12 100644 --- a/app/Contribution/Documents/CitySolingenDocument.php +++ b/app/Contribution/Documents/CitySolingenDocument.php @@ -6,7 +6,6 @@ use App\Contribution\Data\MemberData; use App\Invoice\InvoiceSettings; use Carbon\Carbon; use Illuminate\Support\Collection; -use Illuminate\Support\Str; use Zoomyboy\Tex\Engine; use Zoomyboy\Tex\Template; diff --git a/app/Contribution/Documents/GallierDocument.php b/app/Contribution/Documents/GallierDocument.php index 3b4333c6..bb4a9377 100644 --- a/app/Contribution/Documents/GallierDocument.php +++ b/app/Contribution/Documents/GallierDocument.php @@ -3,14 +3,17 @@ namespace App\Contribution\Documents; use App\Contribution\Data\MemberData; +use App\Contribution\Traits\HasPdfBackground; use App\Country; use Carbon\Carbon; use Illuminate\Support\Collection; -use Zoomyboy\Tex\Engine; use Zoomyboy\Tex\Template; class GallierDocument extends ContributionDocument { + + use HasPdfBackground; + /** * @param Collection> $members */ @@ -84,11 +87,6 @@ class GallierDocument extends ContributionDocument return $this; } - public function getEngine(): Engine - { - return Engine::PDFLATEX; - } - public static function getName(): string { return 'Gallier'; diff --git a/app/Contribution/Documents/RdpNrwDocument.php b/app/Contribution/Documents/RdpNrwDocument.php index 18a7d15e..29a1e972 100644 --- a/app/Contribution/Documents/RdpNrwDocument.php +++ b/app/Contribution/Documents/RdpNrwDocument.php @@ -3,14 +3,16 @@ namespace App\Contribution\Documents; use App\Contribution\Data\MemberData; +use App\Contribution\Traits\HasPdfBackground; use App\Country; use Carbon\Carbon; use Illuminate\Support\Collection; -use Zoomyboy\Tex\Engine; use Zoomyboy\Tex\Template; class RdpNrwDocument extends ContributionDocument { + use HasPdfBackground; + /** * @param Collection> $members */ @@ -115,11 +117,6 @@ class RdpNrwDocument extends ContributionDocument return $this; } - public function getEngine(): Engine - { - return Engine::PDFLATEX; - } - public static function getName(): string { return 'RdP NRW'; diff --git a/app/Contribution/Traits/HasPdfBackground.php b/app/Contribution/Traits/HasPdfBackground.php new file mode 100644 index 00000000..24128d28 --- /dev/null +++ b/app/Contribution/Traits/HasPdfBackground.php @@ -0,0 +1,13 @@ +