Files
firefly-iii/app/Repositories/AuditLogEntry/ALERepositoryInterface.php

53 lines
1.6 KiB
PHP
Raw Normal View History

2022-10-02 14:37:50 +02:00
<?php
2022-10-16 19:29:53 +02:00
2022-10-02 14:37:50 +02:00
/*
* ALERepositoryInterface.php
* Copyright (c) 2022 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/>.
*/
2022-10-16 19:29:53 +02:00
declare(strict_types=1);
2022-10-02 14:37:50 +02:00
namespace FireflyIII\Repositories\AuditLogEntry;
use FireflyIII\Enums\UserRoleEnum;
2022-10-02 14:37:50 +02:00
use FireflyIII\Models\AuditLogEntry;
use FireflyIII\Models\UserGroup;
use FireflyIII\User;
use Illuminate\Contracts\Auth\Authenticatable;
2022-10-02 14:37:50 +02:00
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
/**
* Interface ALERepositoryInterface
*
* @method setUserGroup(UserGroup $group)
* @method getUserGroup()
* @method getUser()
* @method checkUserGroupAccess(UserRoleEnum $role)
* @method setUser(null|Authenticatable|User $user)
* @method setUserGroupById(int $userGroupId)
2022-10-02 14:37:50 +02:00
*/
interface ALERepositoryInterface
{
2022-12-29 19:42:26 +01:00
public function getForObject(Model $model): Collection;
public function getForId(string $model, int $modelId): Collection;
2022-10-02 14:37:50 +02:00
2022-12-29 19:42:26 +01:00
public function store(array $data): AuditLogEntry;
2022-10-02 14:37:50 +02:00
}