mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 23:28:20 +00:00
Currencies can now be enabled and disabled.
This commit is contained in:
@@ -39,7 +39,7 @@ interface CurrencyRepositoryInterface
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canDeleteCurrency(TransactionCurrency $currency): bool;
|
||||
public function currencyInUse(TransactionCurrency $currency): bool;
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $currency
|
||||
@@ -55,6 +55,38 @@ interface CurrencyRepositoryInterface
|
||||
*/
|
||||
public function destroy(TransactionCurrency $currency): bool;
|
||||
|
||||
/**
|
||||
* Disables a currency
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*/
|
||||
public function disable(TransactionCurrency $currency): void;
|
||||
|
||||
/**
|
||||
* Enables a currency
|
||||
*
|
||||
* @param TransactionCurrency $currency
|
||||
*/
|
||||
public function enable(TransactionCurrency $currency): void;
|
||||
|
||||
/**
|
||||
* Find by ID, return NULL if not found.
|
||||
*
|
||||
* @param int $currencyId
|
||||
*
|
||||
* @return TransactionCurrency|null
|
||||
*/
|
||||
public function find(int $currencyId): ?TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Find by currency code, return NULL if unfound.
|
||||
*
|
||||
* @param string $currencyCode
|
||||
*
|
||||
* @return TransactionCurrency|null
|
||||
*/
|
||||
public function findByCode(string $currencyCode): ?TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Find by currency code, return NULL if unfound.
|
||||
*
|
||||
@@ -64,6 +96,15 @@ interface CurrencyRepositoryInterface
|
||||
*/
|
||||
public function findByCodeNull(string $currencyCode): ?TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Find by currency name.
|
||||
*
|
||||
* @param string $currencyName
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function findByName(string $currencyName): ?TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Find by currency name.
|
||||
*
|
||||
@@ -73,6 +114,15 @@ interface CurrencyRepositoryInterface
|
||||
*/
|
||||
public function findByNameNull(string $currencyName): ?TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Find by currency symbol.
|
||||
*
|
||||
* @param string $currencySymbol
|
||||
*
|
||||
* @return TransactionCurrency
|
||||
*/
|
||||
public function findBySymbol(string $currencySymbol): ?TransactionCurrency;
|
||||
|
||||
/**
|
||||
* Find by currency symbol.
|
||||
*
|
||||
@@ -96,6 +146,11 @@ interface CurrencyRepositoryInterface
|
||||
*/
|
||||
public function get(): Collection;
|
||||
|
||||
/**
|
||||
* @return Collection
|
||||
*/
|
||||
public function getAll(): Collection;
|
||||
|
||||
/**
|
||||
* @param array $ids
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user