mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
add comments
This commit is contained in:
parent
ee6da44a94
commit
96fdf787de
@ -19,12 +19,16 @@ class Plain
|
|||||||
{
|
{
|
||||||
use MakesInvoiceValues, BuildTableHeader;
|
use MakesInvoiceValues, BuildTableHeader;
|
||||||
|
|
||||||
|
/** Global list of table elements, @var array */
|
||||||
public $elements;
|
public $elements;
|
||||||
|
|
||||||
|
/** @var App\Models\Client */
|
||||||
public $client;
|
public $client;
|
||||||
|
|
||||||
|
/** @var App\Models\Invoice */
|
||||||
public $invoice;
|
public $invoice;
|
||||||
|
|
||||||
|
/** Global state of the design, @var string */
|
||||||
public $context;
|
public $context;
|
||||||
|
|
||||||
public function html(): ?string
|
public function html(): ?string
|
||||||
@ -36,11 +40,13 @@ class Plain
|
|||||||
|
|
||||||
public function setup(): void
|
public function setup(): void
|
||||||
{
|
{
|
||||||
|
if (isset($this->context['client'])) {
|
||||||
$this->client = $this->context['client'];
|
$this->client = $this->context['client'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->context['invoice'])) {
|
||||||
$this->invoice = $this->context['invoice'];
|
$this->invoice = $this->context['invoice'];
|
||||||
|
}
|
||||||
/** @todo: Wrap the elements with correct checks & exceptions. */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function elements(array $context): array
|
public function elements(array $context): array
|
||||||
@ -72,7 +78,6 @@ class Plain
|
|||||||
['element' => 'td', 'content' => '$subtotal_label', 'properties' => ['class' => 'px-4 py-4 text-right', 'colspan' => '2']],
|
['element' => 'td', 'content' => '$subtotal_label', 'properties' => ['class' => 'px-4 py-4 text-right', 'colspan' => '2']],
|
||||||
['element' => 'td', 'content' => '$subtotal', 'properties' => ['class' => 'px-4 py-2 text-right']],
|
['element' => 'td', 'content' => '$subtotal', 'properties' => ['class' => 'px-4 py-2 text-right']],
|
||||||
]],
|
]],
|
||||||
|
|
||||||
['element' => 'tr', 'content' => '', 'elements' => [
|
['element' => 'tr', 'content' => '', 'elements' => [
|
||||||
['element' => 'td', 'content' => '$discount_label', 'properties' => ['class' => 'border-l-4 border-white px-4 text-right', 'colspan' => '4']],
|
['element' => 'td', 'content' => '$discount_label', 'properties' => ['class' => 'border-l-4 border-white px-4 text-right', 'colspan' => '4']],
|
||||||
['element' => 'td', 'content' => '$discount', 'properties' => ['class' => 'px-4 py-2 text-right']],
|
['element' => 'td', 'content' => '$discount', 'properties' => ['class' => 'px-4 py-2 text-right']],
|
||||||
|
Loading…
Reference in New Issue
Block a user