New event handler object

This commit is contained in:
Sander Dorigo
2026-02-04 08:29:09 +01:00
parent c51df8cd83
commit e1d32da409

View File

@@ -0,0 +1,30 @@
<?php
namespace FireflyIII\Events\Model\TransactionGroup;
use Illuminate\Support\Collection;
/**
* This class collects all objects before and after the creation, removal or updating
* of a transaction group. The idea is that this class contains all relevant objects.
* Right now, that means journals, tags, accounts, budgets and categories.
*
* By collecting these objects (in case of an update: before AND after update) there
* is a unified set of objects to manage: update balances, recalculate credits, etc.
*/
class TransactionGroupEventObjects
{
public Collection $accounts;
public Collection $budgets;
public Collection $categories;
public Collection $tags;
public Collection $transactionJournals;
public function __construct() {
$this->accounts = new Collection();
$this->budgets = new Collection();
$this->categories = new Collection();
$this->tags =new Collection();
$this->transactionJournals = new Collection();
}
}