Widget Owner

If I've got a table widget in a view page (ViewRecord)...how am I getting the model of the record I am viewing ? tried getOwnerRecord()
3 Replies
MikePageDev
MikePageDev2w ago
You need to define the $record property.
public ?Model $record = null;
public ?Model $record = null;
Then you can access the model through $record
Matthew
Matthew7d ago
Thanks, I'll have a go at that. Assume that delcaration is just going in the widget class ?
MikePageDev
MikePageDev7d ago
Yes
Want results from more Discord servers?
Add your server