. */ namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Functions\Functions; use Fisharebest\Webtrees\Individual; /** * Relationshiop to head of household. */ class CensusColumnRelationToHeadGerman extends AbstractCensusColumn implements CensusColumnInterface { /** * Generate the likely value of this census column, based on available information. * * @param Individual $individual * @param Individual|null $head * * @return string */ public function generate(Individual $individual, Individual $head = null) { if ($head === null) { return ''; } elseif ($individual == $head) { return 'Haushaltungsvorstand'; } else { return Functions::getCloseRelationshipName($head, $individual); } } }