Files
firefly-iii/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php

95 lines
1.7 KiB
PHP
Raw Normal View History

2016-01-15 11:16:41 +01:00
<?php
2016-02-05 12:08:25 +01:00
declare(strict_types = 1);
2016-01-15 11:16:41 +01:00
namespace FireflyIII\Repositories\RuleGroup;
use FireflyIII\Models\RuleGroup;
use FireflyIII\User;
use Illuminate\Support\Collection;
2016-01-15 13:13:21 +01:00
/**
* Interface RuleGroupRepositoryInterface
*
* @package FireflyIII\Repositories\RuleGroup
*/
interface RuleGroupRepositoryInterface
2016-01-15 11:16:41 +01:00
{
/**
2016-04-26 09:21:57 +02:00
*
*
* @return int
*/
2016-04-06 09:27:45 +02:00
public function count(): int;
/**
* @param RuleGroup $ruleGroup
* @param RuleGroup $moveTo
*
* @return bool
*/
2016-04-06 09:27:45 +02:00
public function destroy(RuleGroup $ruleGroup, RuleGroup $moveTo = null): bool;
/**
2016-01-19 13:59:54 +01:00
* @return Collection
*/
2016-04-06 09:27:45 +02:00
public function get(): Collection;
/**
2016-01-19 13:59:54 +01:00
* @return int
*/
2016-04-06 09:27:45 +02:00
public function getHighestOrderRuleGroup(): int;
/**
* @param User $user
*
* @return Collection
*/
public function getRuleGroupsWithRules(User $user): Collection;
/**
* @param RuleGroup $ruleGroup
2016-01-15 13:13:21 +01:00
*
* @return bool
*/
2016-04-06 09:27:45 +02:00
public function moveDown(RuleGroup $ruleGroup): bool;
/**
* @param RuleGroup $ruleGroup
2016-01-15 13:13:21 +01:00
*
* @return bool
*/
2016-04-06 09:27:45 +02:00
public function moveUp(RuleGroup $ruleGroup): bool;
/**
* @return bool
*/
2016-04-06 09:27:45 +02:00
public function resetRuleGroupOrder(): bool;
/**
* @param RuleGroup $ruleGroup
*
* @return bool
*/
2016-04-06 09:27:45 +02:00
public function resetRulesInGroupOrder(RuleGroup $ruleGroup): bool;
/**
* @param array $data
*
* @return RuleGroup
*/
2016-04-06 09:27:45 +02:00
public function store(array $data): RuleGroup;
/**
* @param RuleGroup $ruleGroup
* @param array $data
*
* @return RuleGroup
*/
2016-04-06 09:27:45 +02:00
public function update(RuleGroup $ruleGroup, array $data): RuleGroup;
2016-01-15 11:16:41 +01:00
}