mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 17:54:30 -04:00
Implement base design class & remove design interface
This commit is contained in:
parent
35af6e137a
commit
17858dae45
@ -12,11 +12,11 @@
|
||||
|
||||
namespace App\Services\PdfMaker\Designs;
|
||||
|
||||
use App\Services\PdfMaker\Designs\Utilities\BaseDesign;
|
||||
use App\Services\PdfMaker\Designs\Utilities\BuildTableHeader;
|
||||
use App\Services\PdfMaker\Designs\Utilities\DesignInterface;
|
||||
use App\Utils\Traits\MakesInvoiceValues;
|
||||
|
||||
class Plain implements DesignInterface
|
||||
class Plain extends BaseDesign
|
||||
{
|
||||
use MakesInvoiceValues, BuildTableHeader;
|
||||
|
||||
@ -39,17 +39,6 @@ class Plain implements DesignInterface
|
||||
);
|
||||
}
|
||||
|
||||
public function setup(): void
|
||||
{
|
||||
if (isset($this->context['client'])) {
|
||||
$this->client = $this->context['client'];
|
||||
}
|
||||
|
||||
if (isset($this->context['invoice'])) {
|
||||
$this->invoice = $this->context['invoice'];
|
||||
}
|
||||
}
|
||||
|
||||
public function elements(array $context): array
|
||||
{
|
||||
$this->context = $context;
|
||||
|
@ -12,17 +12,16 @@
|
||||
|
||||
namespace App\Services\PdfMaker\Designs\Utilities;
|
||||
|
||||
interface DesignInterface
|
||||
class BaseDesign
|
||||
{
|
||||
public function html(): ?string;
|
||||
public function setup(): void
|
||||
{
|
||||
if (isset($this->context['client'])) {
|
||||
$this->client = $this->context['client'];
|
||||
}
|
||||
|
||||
public function setup(): void;
|
||||
|
||||
public function elements(array $context): array;
|
||||
|
||||
public function productTable(): array;
|
||||
|
||||
public function buildTableHeader(): array;
|
||||
|
||||
public function buildTableBody(): array;
|
||||
if (isset($this->context['invoice'])) {
|
||||
$this->invoice = $this->context['invoice'];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user