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

95 lines
1.7 KiB
PHP
Raw Normal View History

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