mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 02:53:50 +00:00
Add attachments to workflow
This commit is contained in:
@@ -18,6 +18,9 @@ use Chill\DocStoreBundle\GenericDoc\Providers\AccompanyingCourseDocumentGenericD
|
||||
use Chill\DocStoreBundle\Repository\AccompanyingCourseDocumentRepository;
|
||||
use Chill\DocStoreBundle\Repository\PersonDocumentRepository;
|
||||
|
||||
/**
|
||||
* @implements GenericDocRendererInterface<array{row-only?: bool, show-actions?: bool}>
|
||||
*/
|
||||
final readonly class AccompanyingCourseDocumentGenericDocRenderer implements GenericDocRendererInterface
|
||||
{
|
||||
public function __construct(
|
||||
@@ -33,6 +36,10 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
|
||||
|
||||
public function getTemplate(GenericDocDTO $genericDocDTO, $options = []): string
|
||||
{
|
||||
if ($options['row-only'] ?? false) {
|
||||
return '@ChillDocStore/List/list_item_row.html.twig';
|
||||
}
|
||||
|
||||
return '@ChillDocStore/List/list_item.html.twig';
|
||||
}
|
||||
|
||||
@@ -44,6 +51,7 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
|
||||
'accompanyingCourse' => $doc->getCourse(),
|
||||
'options' => $options,
|
||||
'context' => $genericDocDTO->getContext(),
|
||||
'show_actions' => $options['show-actions'] ?? true,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -53,6 +61,7 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
|
||||
'person' => $doc->getPerson(),
|
||||
'options' => $options,
|
||||
'context' => $genericDocDTO->getContext(),
|
||||
'show_actions' => $options['show-actions'] ?? true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user