mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand API and routes.
This commit is contained in:
@@ -34,19 +34,6 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
*/
|
||||
class AvailableBudgetTransformer extends TransformerAbstract
|
||||
{
|
||||
/**
|
||||
* List of resources possible to include
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $availableIncludes = ['transaction_currency', 'user'];
|
||||
/**
|
||||
* List of resources to automatically include
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultIncludes = ['transaction_currency'];
|
||||
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
@@ -62,34 +49,6 @@ class AvailableBudgetTransformer extends TransformerAbstract
|
||||
$this->parameters = $parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the currency.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return Item
|
||||
*/
|
||||
public function includeTransactionCurrency(AvailableBudget $availableBudget): Item
|
||||
{
|
||||
return $this->item($availableBudget->transactionCurrency, new CurrencyTransformer($this->parameters), 'transaction_currencies');
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the user.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return Item
|
||||
*/
|
||||
public function includeUser(AvailableBudget $availableBudget): Item
|
||||
{
|
||||
return $this->item($availableBudget->user, new UserTransformer($this->parameters), 'users');
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform the note.
|
||||
*
|
||||
|
Reference in New Issue
Block a user