Access current record data from within getRelations
Guys, do you know if it is possible to access data from the current record within the getRelations method?
Something like:
public static function getRelations(): array
{
$participantType = $this->ownerRecord->type;
if ($participantType === 'participant') {
$relationsManagers[] = PartnersRelationManager::class;
} elseif ($participantType === 'partner') {
$relationsManagers[] = ParticipantRelationManager::class;
}
}
Thanks!
2 Replies
Solution
Thank you @LeandroFerreira erreira, I was able to perform the verification using this method.