mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
More code for import routine.
This commit is contained in:
@@ -153,6 +153,18 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
return $firstJournalDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all categories with ID's.
|
||||
*
|
||||
* @param array $categoryIds
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getByIds(array $categoryIds): Collection
|
||||
{
|
||||
return $this->user->categories()->whereIn('id', $categoryIds)->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all the categories belonging to a user.
|
||||
*
|
||||
|
||||
@@ -32,6 +32,7 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
interface CategoryRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Category $category
|
||||
*
|
||||
@@ -84,6 +85,15 @@ interface CategoryRepositoryInterface
|
||||
*/
|
||||
public function firstUseDate(Category $category): ?Carbon;
|
||||
|
||||
/**
|
||||
* Get all categories with ID's.
|
||||
*
|
||||
* @param array $categoryIds
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getByIds(array $categoryIds): Collection;
|
||||
|
||||
/**
|
||||
* Returns a list of all the categories belonging to a user.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user