CollectionField render table with data

I have something like this:
Client - oneToMany - ClientActivities.
In Details page I’d like to render ClientActivities as sortable table with filtering and so on – like at Index page of ClientActivities.
How to Inject one view into another?
Tried like this:

public function configureFields(string $pageName): iterable
{
    $activities = CollectionField::new('clientActivities', 'Activities');
    return [
        $activities->setEntryIsComplex(true)
    ];
}

Tried with options like

->setEntryType(ClientActivityCrudController::getEntityFqcn())
->setFieldFqcn(ClientActivityCrudController::getEntityFqcn())

but nothing helped.
Event tried with ->setTemplateName('crud/index') which is returning error too.

Source: Symfony4 Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *