Files
firefly-iii/app/View/Components/Elements/TransactionAmount.php
T

42 lines
1.0 KiB
PHP
Raw Normal View History

2026-06-16 14:37:42 +02:00
<?php
declare(strict_types=1);
2026-06-16 14:37:42 +02:00
namespace FireflyIII\View\Components\Elements;
use Closure;
use FireflyIII\Models\Account;
use Illuminate\Contracts\View\View;
use Illuminate\View\Component;
class TransactionAmount extends Component
{
public string $type;
public array $amount;
public array $foreign;
public ?string $pcAmount;
public ?Account $account;
2026-06-24 05:00:00 +02:00
public string $sourceAccountType;
2026-06-16 14:37:42 +02:00
/**
* Create a new component instance.
*/
2026-06-24 05:00:00 +02:00
public function __construct(string $type, array $amount, array $foreign, string $sourceAccountType, ?string $pcAmount, ?Account $account)
2026-06-16 14:37:42 +02:00
{
$this->type = $type;
$this->amount = $amount;
$this->foreign = $foreign;
$this->account = $account;
2026-06-16 14:37:42 +02:00
$this->pcAmount = $pcAmount;
2026-06-24 05:00:00 +02:00
$this->sourceAccountType = $sourceAccountType;
2026-06-16 14:37:42 +02:00
}
/**
* Get the view / contents that represent the component.
*/
public function render(): Closure|string|View
2026-06-16 14:37:42 +02:00
{
return view('components.elements.transaction-amount');
}
}