mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-28 17:24:35 -06:00
Removed cache from typeIcon
This commit is contained in:
parent
9f16799453
commit
5978b1c421
@ -74,13 +74,6 @@ class Journal extends Twig_Extension
|
|||||||
return new Twig_SimpleFilter(
|
return new Twig_SimpleFilter(
|
||||||
'typeIcon', function (TransactionJournal $journal): string {
|
'typeIcon', function (TransactionJournal $journal): string {
|
||||||
|
|
||||||
$cache = new CacheProperties();
|
|
||||||
$cache->addProperty($journal->id);
|
|
||||||
$cache->addProperty('typeIcon');
|
|
||||||
if ($cache->has()) {
|
|
||||||
return $cache->get(); // @codeCoverageIgnore
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case $journal->isWithdrawal():
|
case $journal->isWithdrawal():
|
||||||
$txt = '<i class="fa fa-long-arrow-left fa-fw" title="' . trans('firefly.withdrawal') . '"></i>';
|
$txt = '<i class="fa fa-long-arrow-left fa-fw" title="' . trans('firefly.withdrawal') . '"></i>';
|
||||||
@ -98,11 +91,8 @@ class Journal extends Twig_Extension
|
|||||||
$txt = '';
|
$txt = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$cache->store($txt);
|
|
||||||
|
|
||||||
return $txt;
|
return $txt;
|
||||||
|
|
||||||
|
|
||||||
}, ['is_safe' => ['html']]
|
}, ['is_safe' => ['html']]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user