mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
First working version of the group collector.
This commit is contained in:
@@ -25,6 +25,7 @@ namespace FireflyIII\Helpers\Collector;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
@@ -39,6 +40,13 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function getGroups(): Collection;
|
||||
|
||||
/**
|
||||
* Same as getGroups but everything is in a paginator.
|
||||
*
|
||||
* @return LengthAwarePaginator
|
||||
*/
|
||||
public function getPaginatedGroups(): LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Define which accounts can be part of the source and destination transactions.
|
||||
*
|
||||
@@ -76,6 +84,15 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setRange(Carbon $start, Carbon $end): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Limit the included transaction types.
|
||||
*
|
||||
* @param array $types
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setTypes(array $types): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Set the user object and start the query.
|
||||
*
|
||||
@@ -85,4 +102,32 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function setUser(User $user): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Will include the source and destination account names and types.
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withAccountInformation(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Include bill name + ID.
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withBillInformation(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Will include budget ID + name, if any.
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withBudgetInformation(): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* Will include category ID + name, if any.
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withCategoryInformation(): GroupCollectorInterface;
|
||||
|
||||
}
|
Reference in New Issue
Block a user