firefly-iii/app/Helpers/Csv/Mapper/TransactionCurrency.php

33 lines
625 B
PHP
Raw Normal View History

<?php
namespace FireflyIII\Helpers\Csv\Mapper;
use FireflyIII\Models\TransactionCurrency as TC;
/**
* Class TransactionCurrency
*
* @package FireflyIII\Helpers\Csv\Mapper
*/
class TransactionCurrency implements MapperInterface
{
/**
* @return array
*/
public function getMap()
{
$currencies = TC::get();
$list = [];
foreach ($currencies as $currency) {
$list[$currency->id] = $currency->name . ' (' . $currency->code . ')';
}
2015-07-06 01:14:19 -05:00
asort($list);
2015-07-09 12:36:14 -05:00
$list = [0 => trans('firefly.csv_do_not_map')] + $list;
2015-07-06 01:14:19 -05:00
return $list;
}
2015-07-09 14:26:40 -05:00
}