Files
firefly-iii/app/Repositories/ObjectGroup/ObjectGroupRepositoryInterface.php

75 lines
2.1 KiB
PHP
Raw Normal View History

2020-06-07 11:31:01 +02:00
<?php
2020-06-30 19:05:35 +02:00
/**
* ObjectGroupRepositoryInterface.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2020-06-07 11:31:01 +02:00
declare(strict_types=1);
namespace FireflyIII\Repositories\ObjectGroup;
use FireflyIII\Enums\UserRoleEnum;
2020-06-20 10:10:55 +02:00
use FireflyIII\Models\ObjectGroup;
use FireflyIII\Models\UserGroup;
use FireflyIII\User;
use Illuminate\Contracts\Auth\Authenticatable;
2020-06-07 11:31:01 +02:00
use Illuminate\Support\Collection;
/**
* Interface ObjectGroupRepositoryInterface
*
* @method setUserGroup(UserGroup $group)
* @method getUserGroup()
* @method getUser()
* @method checkUserGroupAccess(UserRoleEnum $role)
* @method setUser(null|Authenticatable|User $user)
* @method setUserGroupById(int $userGroupId)
2020-06-07 11:31:01 +02:00
*/
interface ObjectGroupRepositoryInterface
{
/**
2021-03-12 06:20:01 +01:00
* Delete all.
2020-06-07 11:31:01 +02:00
*/
2021-03-12 06:20:01 +01:00
public function deleteAll(): void;
2020-06-07 11:31:01 +02:00
/**
2021-03-12 06:20:01 +01:00
* Delete empty ones.
2020-06-07 11:31:01 +02:00
*/
2021-03-12 06:20:01 +01:00
public function deleteEmpty(): void;
2020-06-07 11:31:01 +02:00
2021-03-12 06:20:01 +01:00
public function destroy(ObjectGroup $objectGroup): void;
public function get(): Collection;
2020-06-07 16:38:15 +02:00
2021-03-12 06:20:01 +01:00
public function getBills(ObjectGroup $objectGroup): Collection;
2020-06-20 16:28:23 +02:00
2021-03-12 06:20:01 +01:00
public function getPiggyBanks(ObjectGroup $objectGroup): Collection;
2021-03-06 15:00:34 +01:00
2021-03-21 09:15:40 +01:00
/**
* Delete all.
*/
public function resetOrder(): void;
2021-03-12 06:20:01 +01:00
public function search(string $query, int $limit): Collection;
2020-06-07 16:38:15 +02:00
2021-03-14 06:20:23 +01:00
public function setOrder(ObjectGroup $objectGroup, int $newOrder): ObjectGroup;
2021-03-12 06:20:01 +01:00
2020-06-20 10:10:55 +02:00
public function update(ObjectGroup $objectGroup, array $data): ObjectGroup;
2020-06-07 11:31:01 +02:00
}