/** * Get significant information from this page, to allow other pages such as * charts and reports to initialise with the same records * * @return Family */ public function getSignificantFamily() { if ($this->record) { return $this->record; } return parent::getSignificantFamily(); }
/** * Get significant information from this page, to allow other pages such as * charts and reports to initialise with the same records * * @return Family */ public function getSignificantFamily() { if ($this->record) { foreach ($this->record->getChildFamilies() as $family) { return $family; } foreach ($this->record->getSpouseFamilies() as $family) { return $family; } } return parent::getSignificantFamily(); }