$options['data'] empty when using entryType
Hello,
I'm using a CollectionField for my documents field in my CrudController, and I wanted to access $options['data'] to set the access granted for each document.
This method doesn't work because $options['data'] is empty. I've also tried applying the access with setPermission for each document, but it doesn't take a callback.
Am I doing this wrong, is there another way, or is it simply not possible?
I think I can try to do this by creating a custom template, but since I'm using the default CollectionField template, I'd like to avoid.
Thanks for your replies.
I try to pass subject or object variable in the ->setPermission(new Expression("is_granted('" . <MYVOTER::CAN_EDIT> . "', subject)")), but I got a FieldDto and null value if I do $subject->getValue() in my Voter
up
up