mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 13:16:31 +00:00
New event handler object
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user