Moved extension to fa-icon logic to a service.

That way we can use it from inside PHP code and the logic is more testable.
This commit is contained in:
Jan Böhmer 2019-11-10 18:19:06 +01:00
parent bf8455fa42
commit 8b80f31b1e
5 changed files with 170 additions and 31 deletions

View file

@ -33,6 +33,7 @@ use App\Services\AmountFormatter;
use App\Services\Attachments\AttachmentURLGenerator;
use App\Services\Attachments\PartPreviewGenerator;
use App\Services\EntityURLGenerator;
use App\Services\FAIconGenerator;
use App\Services\TreeBuilder;
use Doctrine\ORM\QueryBuilder;
use Omines\DataTablesBundle\Adapter\Doctrine\ORM\SearchCriteriaProvider;
@ -58,7 +59,8 @@ class PartsDataTable implements DataTableTypeInterface
public function __construct(EntityURLGenerator $urlGenerator, TranslatorInterface $translator,
TreeBuilder $treeBuilder, AmountFormatter $amountFormatter,
PartPreviewGenerator $previewGenerator, AttachmentURLGenerator $attachmentURLGenerator)
PartPreviewGenerator $previewGenerator, AttachmentURLGenerator $attachmentURLGenerator,
FAIconGenerator $FAIconGenerator)
{
$this->urlGenerator = $urlGenerator;
$this->translator = $translator;