repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
partition
stringclasses
1 value
fisharebest/webtrees
app/Module/LifespansChartModule.php
LifespansChartModule.subtitle
protected function subtitle(int $count, Date $start, Date $end, string $placename): string { if ($start->isOK() && $end->isOK() && $placename !== '') { return I18N::plural( '%s individual with events in %s between %s and %s', '%s individuals with events in %s betw...
php
protected function subtitle(int $count, Date $start, Date $end, string $placename): string { if ($start->isOK() && $end->isOK() && $placename !== '') { return I18N::plural( '%s individual with events in %s between %s and %s', '%s individuals with events in %s betw...
[ "protected", "function", "subtitle", "(", "int", "$", "count", ",", "Date", "$", "start", ",", "Date", "$", "end", ",", "string", "$", "placename", ")", ":", "string", "{", "if", "(", "$", "start", "->", "isOK", "(", ")", "&&", "$", "end", "->", ...
Generate a subtitle, based on filter parameters @param int $count @param Date $start @param Date $end @param string $placename @return string
[ "Generate", "a", "subtitle", "based", "on", "filter", "parameters" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/LifespansChartModule.php#L426-L462
train
fisharebest/webtrees
app/Http/Controllers/Auth/RegisterController.php
RegisterController.registerPage
public function registerPage(ServerRequestInterface $request): ResponseInterface { $this->checkRegistrationAllowed(); $comments = $request->get('comments', ''); $email = $request->get('email', ''); $realname = $request->get('realname', ''); $username = $request->get('user...
php
public function registerPage(ServerRequestInterface $request): ResponseInterface { $this->checkRegistrationAllowed(); $comments = $request->get('comments', ''); $email = $request->get('email', ''); $realname = $request->get('realname', ''); $username = $request->get('user...
[ "public", "function", "registerPage", "(", "ServerRequestInterface", "$", "request", ")", ":", "ResponseInterface", "{", "$", "this", "->", "checkRegistrationAllowed", "(", ")", ";", "$", "comments", "=", "$", "request", "->", "get", "(", "'comments'", ",", "'...
Show a registration page. @param ServerRequestInterface $request @return ResponseInterface
[ "Show", "a", "registration", "page", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Auth/RegisterController.php#L63-L84
train
fisharebest/webtrees
app/Http/Controllers/Auth/RegisterController.php
RegisterController.verifyPage
public function verifyPage(): ResponseInterface { $this->checkRegistrationAllowed(); $title = I18N::translate('User verification'); return $this->viewResponse('register-page', [ 'title' => $title, ]); }
php
public function verifyPage(): ResponseInterface { $this->checkRegistrationAllowed(); $title = I18N::translate('User verification'); return $this->viewResponse('register-page', [ 'title' => $title, ]); }
[ "public", "function", "verifyPage", "(", ")", ":", "ResponseInterface", "{", "$", "this", "->", "checkRegistrationAllowed", "(", ")", ";", "$", "title", "=", "I18N", "::", "translate", "(", "'User verification'", ")", ";", "return", "$", "this", "->", "viewR...
Show an email verification page. @return ResponseInterface
[ "Show", "an", "email", "verification", "page", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Auth/RegisterController.php#L223-L232
train
fisharebest/webtrees
app/GedcomCode/GedcomCodeTemp.php
GedcomCodeTemp.templeNames
public static function templeNames(): array { $temple_names = []; foreach (self::templeCodes() as $temple_code) { $temple_names[$temple_code] = self::templeName($temple_code); } uasort($temple_names, '\Fisharebest\Webtrees\I18N::strcasecmp'); return $temple_names...
php
public static function templeNames(): array { $temple_names = []; foreach (self::templeCodes() as $temple_code) { $temple_names[$temple_code] = self::templeName($temple_code); } uasort($temple_names, '\Fisharebest\Webtrees\I18N::strcasecmp'); return $temple_names...
[ "public", "static", "function", "templeNames", "(", ")", ":", "array", "{", "$", "temple_names", "=", "[", "]", ";", "foreach", "(", "self", "::", "templeCodes", "(", ")", "as", "$", "temple_code", ")", "{", "$", "temple_names", "[", "$", "temple_code", ...
A sorted list of all temple names @return string[]
[ "A", "sorted", "list", "of", "all", "temple", "names" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/GedcomCode/GedcomCodeTemp.php#L696-L705
train
fisharebest/webtrees
app/Age.php
Age.asText
public function asText(): string { if ($this->keyword === self::KEYWORD_STILLBORN) { // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (stillborn) return I18N::translate('(stillborn)'); } if ($this->keyword === self::KEYWORD_INFANT) { // I18...
php
public function asText(): string { if ($this->keyword === self::KEYWORD_STILLBORN) { // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (stillborn) return I18N::translate('(stillborn)'); } if ($this->keyword === self::KEYWORD_INFANT) { // I18...
[ "public", "function", "asText", "(", ")", ":", "string", "{", "if", "(", "$", "this", "->", "keyword", "===", "self", "::", "KEYWORD_STILLBORN", ")", "{", "// I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (stillborn)", "return", "I18N", "::", "translate...
Convert an age to localised text.
[ "Convert", "an", "age", "to", "localised", "text", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Age.php#L112-L171
train
fisharebest/webtrees
app/Report/ReportPdfLine.php
ReportPdfLine.render
public function render($renderer) { if ($this->x1 === ReportBaseElement::CURRENT_POSITION) { $this->x1 = $renderer->GetX(); } if ($this->y1 === ReportBaseElement::CURRENT_POSITION) { $this->y1 = $renderer->GetY(); } if ($this->x2 === ReportBaseElement:...
php
public function render($renderer) { if ($this->x1 === ReportBaseElement::CURRENT_POSITION) { $this->x1 = $renderer->GetX(); } if ($this->y1 === ReportBaseElement::CURRENT_POSITION) { $this->y1 = $renderer->GetY(); } if ($this->x2 === ReportBaseElement:...
[ "public", "function", "render", "(", "$", "renderer", ")", "{", "if", "(", "$", "this", "->", "x1", "===", "ReportBaseElement", "::", "CURRENT_POSITION", ")", "{", "$", "this", "->", "x1", "=", "$", "renderer", "->", "GetX", "(", ")", ";", "}", "if",...
PDF line renderer @param ReportTcpdf $renderer @return void
[ "PDF", "line", "renderer" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportPdfLine.php#L32-L51
train
fisharebest/webtrees
app/Report/ReportPdfImage.php
ReportPdfImage.render
public function render($renderer) { static $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright; // Check for a pagebreak first if ($renderer->checkPageBreakPDF($this->height + 5)) { $this->y = $renderer->GetY(); } $curx = $renderer->GetX(); // Get...
php
public function render($renderer) { static $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright; // Check for a pagebreak first if ($renderer->checkPageBreakPDF($this->height + 5)) { $this->y = $renderer->GetY(); } $curx = $renderer->GetX(); // Get...
[ "public", "function", "render", "(", "$", "renderer", ")", "{", "static", "$", "lastpicbottom", ",", "$", "lastpicpage", ",", "$", "lastpicleft", ",", "$", "lastpicright", ";", "// Check for a pagebreak first", "if", "(", "$", "renderer", "->", "checkPageBreakPD...
PDF image renderer @param ReportTcpdf $renderer @return void
[ "PDF", "image", "renderer" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportPdfImage.php#L32-L101
train
fisharebest/webtrees
app/Module/InteractiveTree/TreeView.php
TreeView.getPersons
public function getPersons(Tree $tree, string $request): string { $json_requests = explode(';', $request); $r = []; foreach ($json_requests as $json_request) { $firstLetter = substr($json_request, 0, 1); $json_request = substr($json_request, 1); switch...
php
public function getPersons(Tree $tree, string $request): string { $json_requests = explode(';', $request); $r = []; foreach ($json_requests as $json_request) { $firstLetter = substr($json_request, 0, 1); $json_request = substr($json_request, 1); switch...
[ "public", "function", "getPersons", "(", "Tree", "$", "tree", ",", "string", "$", "request", ")", ":", "string", "{", "$", "json_requests", "=", "explode", "(", "';'", ",", "$", "request", ")", ";", "$", "r", "=", "[", "]", ";", "foreach", "(", "$"...
Return a JSON structure to a JSON request @param Tree $tree @param string $request list of JSON requests @return string
[ "Return", "a", "JSON", "structure", "to", "a", "JSON", "request" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/InteractiveTree/TreeView.php#L75-L112
train
fisharebest/webtrees
app/Module/InteractiveTree/TreeView.php
TreeView.getPersonDetails
private function getPersonDetails(Individual $individual, Family $family = null): string { $chart_url = route('module', [ 'module' => 'tree', 'action' => 'Chart', 'xref' => $individual->xref(), 'ged' => $individual->tree()->name(), ]); $h...
php
private function getPersonDetails(Individual $individual, Family $family = null): string { $chart_url = route('module', [ 'module' => 'tree', 'action' => 'Chart', 'xref' => $individual->xref(), 'ged' => $individual->tree()->name(), ]); $h...
[ "private", "function", "getPersonDetails", "(", "Individual", "$", "individual", ",", "Family", "$", "family", "=", "null", ")", ":", "string", "{", "$", "chart_url", "=", "route", "(", "'module'", ",", "[", "'module'", "=>", "'tree'", ",", "'action'", "=>...
Return the details for a person @param Individual $individual @param Family|null $family @return string
[ "Return", "the", "details", "for", "a", "person" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/InteractiveTree/TreeView.php#L142-L166
train
fisharebest/webtrees
app/Module/InteractiveTree/TreeView.php
TreeView.drawChildren
private function drawChildren(Collection $familyList, int $gen = 1, bool $ajax = false): string { $html = ''; $children2draw = []; $f2load = []; foreach ($familyList as $f) { $children = $f->children(); if ($children->isNotEmpty()) { ...
php
private function drawChildren(Collection $familyList, int $gen = 1, bool $ajax = false): string { $html = ''; $children2draw = []; $f2load = []; foreach ($familyList as $f) { $children = $f->children(); if ($children->isNotEmpty()) { ...
[ "private", "function", "drawChildren", "(", "Collection", "$", "familyList", ",", "int", "$", "gen", "=", "1", ",", "bool", "$", "ajax", "=", "false", ")", ":", "string", "{", "$", "html", "=", "''", ";", "$", "children2draw", "=", "[", "]", ";", "...
Draw the children for some families @param Collection $familyList array of families to draw the children for @param int $gen number of generations to draw @param bool $ajax true for an ajax call @return string
[ "Draw", "the", "children", "for", "some", "families" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/InteractiveTree/TreeView.php#L177-L216
train
fisharebest/webtrees
app/Module/InteractiveTree/TreeView.php
TreeView.drawPersonName
private function drawPersonName(Individual $individual, string $dashed): string { $family = $individual->primaryChildFamily(); if ($family) { $family_name = strip_tags($family->fullName()); } else { $family_name = I18N::translateContext('unknown family', 'unknown'); ...
php
private function drawPersonName(Individual $individual, string $dashed): string { $family = $individual->primaryChildFamily(); if ($family) { $family_name = strip_tags($family->fullName()); } else { $family_name = I18N::translateContext('unknown family', 'unknown'); ...
[ "private", "function", "drawPersonName", "(", "Individual", "$", "individual", ",", "string", "$", "dashed", ")", ":", "string", "{", "$", "family", "=", "$", "individual", "->", "primaryChildFamily", "(", ")", ";", "if", "(", "$", "family", ")", "{", "$...
Draw a person name preceded by sex icon, with parents as tooltip @param Individual $individual The individual to draw @param string $dashed Either "dashed", to print dashed top border to separate multiple spouses, or "" @return string
[ "Draw", "a", "person", "name", "preceded", "by", "sex", "icon", "with", "parents", "as", "tooltip" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/InteractiveTree/TreeView.php#L342-L367
train
fisharebest/webtrees
app/Fact.php
Fact.value
public function value(): string { if (preg_match('/^1 (?:' . $this->tag . ') ?(.*(?:(?:\n2 CONT ?.*)*))/', $this->gedcom, $match)) { return preg_replace("/\n2 CONT ?/", "\n", $match[1]); } return ''; }
php
public function value(): string { if (preg_match('/^1 (?:' . $this->tag . ') ?(.*(?:(?:\n2 CONT ?.*)*))/', $this->gedcom, $match)) { return preg_replace("/\n2 CONT ?/", "\n", $match[1]); } return ''; }
[ "public", "function", "value", "(", ")", ":", "string", "{", "if", "(", "preg_match", "(", "'/^1 (?:'", ".", "$", "this", "->", "tag", ".", "') ?(.*(?:(?:\\n2 CONT ?.*)*))/'", ",", "$", "this", "->", "gedcom", ",", "$", "match", ")", ")", "{", "return", ...
Get the value of level 1 data in the fact Allow for multi-line values @return string
[ "Get", "the", "value", "of", "level", "1", "data", "in", "the", "fact", "Allow", "for", "multi", "-", "line", "values" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L194-L201
train
fisharebest/webtrees
app/Fact.php
Fact.target
public function target() { $xref = trim($this->value(), '@'); switch ($this->tag) { case 'FAMC': case 'FAMS': return Family::getInstance($xref, $this->record()->tree()); case 'HUSB': case 'WIFE': case 'CHIL': ...
php
public function target() { $xref = trim($this->value(), '@'); switch ($this->tag) { case 'FAMC': case 'FAMS': return Family::getInstance($xref, $this->record()->tree()); case 'HUSB': case 'WIFE': case 'CHIL': ...
[ "public", "function", "target", "(", ")", "{", "$", "xref", "=", "trim", "(", "$", "this", "->", "value", "(", ")", ",", "'@'", ")", ";", "switch", "(", "$", "this", "->", "tag", ")", "{", "case", "'FAMC'", ":", "case", "'FAMS'", ":", "return", ...
Get the record to which this fact links @return Individual|Family|Source|Repository|Media|Note|GedcomRecord|null
[ "Get", "the", "record", "to", "which", "this", "fact", "links" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L208-L230
train
fisharebest/webtrees
app/Fact.php
Fact.attribute
public function attribute($tag): string { if (preg_match('/\n2 (?:' . $tag . ') ?(.*(?:(?:\n3 CONT ?.*)*)*)/', $this->gedcom, $match)) { return preg_replace("/\n3 CONT ?/", "\n", $match[1]); } return ''; }
php
public function attribute($tag): string { if (preg_match('/\n2 (?:' . $tag . ') ?(.*(?:(?:\n3 CONT ?.*)*)*)/', $this->gedcom, $match)) { return preg_replace("/\n3 CONT ?/", "\n", $match[1]); } return ''; }
[ "public", "function", "attribute", "(", "$", "tag", ")", ":", "string", "{", "if", "(", "preg_match", "(", "'/\\n2 (?:'", ".", "$", "tag", ".", "') ?(.*(?:(?:\\n3 CONT ?.*)*)*)/'", ",", "$", "this", "->", "gedcom", ",", "$", "match", ")", ")", "{", "retu...
Get the value of level 2 data in the fact @param string $tag @return string
[ "Get", "the", "value", "of", "level", "2", "data", "in", "the", "fact" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L239-L246
train
fisharebest/webtrees
app/Fact.php
Fact.canShow
public function canShow(int $access_level = null): bool { if ($access_level === null) { $access_level = Auth::accessLevel($this->record()->tree()); } // Does this record have an explicit RESN? if (strpos($this->gedcom, "\n2 RESN confidential") !== false) { re...
php
public function canShow(int $access_level = null): bool { if ($access_level === null) { $access_level = Auth::accessLevel($this->record()->tree()); } // Does this record have an explicit RESN? if (strpos($this->gedcom, "\n2 RESN confidential") !== false) { re...
[ "public", "function", "canShow", "(", "int", "$", "access_level", "=", "null", ")", ":", "bool", "{", "if", "(", "$", "access_level", "===", "null", ")", "{", "$", "access_level", "=", "Auth", "::", "accessLevel", "(", "$", "this", "->", "record", "(",...
Do the privacy rules allow us to display this fact to the current user @param int|null $access_level @return bool
[ "Do", "the", "privacy", "rules", "allow", "us", "to", "display", "this", "fact", "to", "the", "current", "user" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L287-L317
train
fisharebest/webtrees
app/Fact.php
Fact.canEdit
public function canEdit(): bool { if ($this->isPendingDeletion()) { return false; } if (Auth::isManager($this->record->tree())) { return true; } // Members cannot edit RESN, CHAN and locked records return Auth::isEditor($this->record->tree())...
php
public function canEdit(): bool { if ($this->isPendingDeletion()) { return false; } if (Auth::isManager($this->record->tree())) { return true; } // Members cannot edit RESN, CHAN and locked records return Auth::isEditor($this->record->tree())...
[ "public", "function", "canEdit", "(", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "isPendingDeletion", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "Auth", "::", "isManager", "(", "$", "this", "->", "record", "->", "tree", "...
Check whether this fact is protected against edit @return bool
[ "Check", "whether", "this", "fact", "is", "protected", "against", "edit" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L324-L336
train
fisharebest/webtrees
app/Fact.php
Fact.place
public function place(): Place { if ($this->place === null) { $this->place = new Place($this->attribute('PLAC'), $this->record()->tree()); } return $this->place; }
php
public function place(): Place { if ($this->place === null) { $this->place = new Place($this->attribute('PLAC'), $this->record()->tree()); } return $this->place; }
[ "public", "function", "place", "(", ")", ":", "Place", "{", "if", "(", "$", "this", "->", "place", "===", "null", ")", "{", "$", "this", "->", "place", "=", "new", "Place", "(", "$", "this", "->", "attribute", "(", "'PLAC'", ")", ",", "$", "this"...
The place where the event occured. @return Place
[ "The", "place", "where", "the", "event", "occured", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L343-L350
train
fisharebest/webtrees
app/Fact.php
Fact.date
public function date(): Date { if ($this->date === null) { $this->date = new Date($this->attribute('DATE')); } return $this->date; }
php
public function date(): Date { if ($this->date === null) { $this->date = new Date($this->attribute('DATE')); } return $this->date; }
[ "public", "function", "date", "(", ")", ":", "Date", "{", "if", "(", "$", "this", "->", "date", "===", "null", ")", "{", "$", "this", "->", "date", "=", "new", "Date", "(", "$", "this", "->", "attribute", "(", "'DATE'", ")", ")", ";", "}", "ret...
Get the date for this fact. We can call this function many times, especially when sorting, so keep a copy of the date. @return Date
[ "Get", "the", "date", "for", "this", "fact", ".", "We", "can", "call", "this", "function", "many", "times", "especially", "when", "sorting", "so", "keep", "a", "copy", "of", "the", "date", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L359-L366
train
fisharebest/webtrees
app/Fact.php
Fact.label
public function label(): string { // Custom FACT/EVEN - with a TYPE if (($this->tag === 'FACT' || $this->tag === 'EVEN') && $this->attribute('TYPE') !== '') { return I18N::translate(e($this->attribute('TYPE'))); } return GedcomTag::getLabel($this->tag, $this->record); ...
php
public function label(): string { // Custom FACT/EVEN - with a TYPE if (($this->tag === 'FACT' || $this->tag === 'EVEN') && $this->attribute('TYPE') !== '') { return I18N::translate(e($this->attribute('TYPE'))); } return GedcomTag::getLabel($this->tag, $this->record); ...
[ "public", "function", "label", "(", ")", ":", "string", "{", "// Custom FACT/EVEN - with a TYPE", "if", "(", "(", "$", "this", "->", "tag", "===", "'FACT'", "||", "$", "this", "->", "tag", "===", "'EVEN'", ")", "&&", "$", "this", "->", "attribute", "(", ...
Get the name of this fact type, for use as a label. @return string
[ "Get", "the", "name", "of", "this", "fact", "type", "for", "use", "as", "a", "label", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L425-L433
train
fisharebest/webtrees
app/Fact.php
Fact.getCitations
public function getCitations(): array { preg_match_all('/\n(2 SOUR @(' . Gedcom::REGEX_XREF . ')@(?:\n[3-9] .*)*)/', $this->gedcom(), $matches, PREG_SET_ORDER); $citations = []; foreach ($matches as $match) { $source = Source::getInstance($match[2], $this->record()->tree()); ...
php
public function getCitations(): array { preg_match_all('/\n(2 SOUR @(' . Gedcom::REGEX_XREF . ')@(?:\n[3-9] .*)*)/', $this->gedcom(), $matches, PREG_SET_ORDER); $citations = []; foreach ($matches as $match) { $source = Source::getInstance($match[2], $this->record()->tree()); ...
[ "public", "function", "getCitations", "(", ")", ":", "array", "{", "preg_match_all", "(", "'/\\n(2 SOUR @('", ".", "Gedcom", "::", "REGEX_XREF", ".", "')@(?:\\n[3-9] .*)*)/'", ",", "$", "this", "->", "gedcom", "(", ")", ",", "$", "matches", ",", "PREG_SET_ORDE...
Source citations linked to this fact @return string[]
[ "Source", "citations", "linked", "to", "this", "fact" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L482-L494
train
fisharebest/webtrees
app/Fact.php
Fact.getMedia
public function getMedia(): array { $media = []; preg_match_all('/\n2 OBJE @(' . Gedcom::REGEX_XREF . ')@/', $this->gedcom(), $matches); foreach ($matches[1] as $match) { $obje = Media::getInstance($match, $this->record()->tree()); if ($obje && $obje->canShow()) { ...
php
public function getMedia(): array { $media = []; preg_match_all('/\n2 OBJE @(' . Gedcom::REGEX_XREF . ')@/', $this->gedcom(), $matches); foreach ($matches[1] as $match) { $obje = Media::getInstance($match, $this->record()->tree()); if ($obje && $obje->canShow()) { ...
[ "public", "function", "getMedia", "(", ")", ":", "array", "{", "$", "media", "=", "[", "]", ";", "preg_match_all", "(", "'/\\n2 OBJE @('", ".", "Gedcom", "::", "REGEX_XREF", ".", "')@/'", ",", "$", "this", "->", "gedcom", "(", ")", ",", "$", "matches",...
Media objects linked to this fact @return Media[]
[ "Media", "objects", "linked", "to", "this", "fact" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L527-L539
train
fisharebest/webtrees
app/Fact.php
Fact.dateComparator
private static function dateComparator(): Closure { return static function (Fact $a, Fact $b): int { if ($a->date()->isOK() && $b->date()->isOK()) { // If both events have dates, compare by date $ret = Date::compare($a->date(), $b->date()); if ($r...
php
private static function dateComparator(): Closure { return static function (Fact $a, Fact $b): int { if ($a->date()->isOK() && $b->date()->isOK()) { // If both events have dates, compare by date $ret = Date::compare($a->date(), $b->date()); if ($r...
[ "private", "static", "function", "dateComparator", "(", ")", ":", "Closure", "{", "return", "static", "function", "(", "Fact", "$", "a", ",", "Fact", "$", "b", ")", ":", "int", "{", "if", "(", "$", "a", "->", "date", "(", ")", "->", "isOK", "(", ...
Helper functions to sort facts @return Closure
[ "Helper", "functions", "to", "sort", "facts" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L592-L615
train
fisharebest/webtrees
app/Fact.php
Fact.typeComparator
public static function typeComparator(): Closure { static $factsort = []; if (empty($factsort)) { $factsort = array_flip(self::FACT_ORDER); } return static function (Fact $a, Fact $b) use ($factsort): int { // Facts from same families stay grouped together ...
php
public static function typeComparator(): Closure { static $factsort = []; if (empty($factsort)) { $factsort = array_flip(self::FACT_ORDER); } return static function (Fact $a, Fact $b) use ($factsort): int { // Facts from same families stay grouped together ...
[ "public", "static", "function", "typeComparator", "(", ")", ":", "Closure", "{", "static", "$", "factsort", "=", "[", "]", ";", "if", "(", "empty", "(", "$", "factsort", ")", ")", "{", "$", "factsort", "=", "array_flip", "(", "self", "::", "FACT_ORDER"...
Helper functions to sort facts. @return Closure
[ "Helper", "functions", "to", "sort", "facts", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L622-L686
train
fisharebest/webtrees
app/Fact.php
Fact.sortFacts
public static function sortFacts(Collection $unsorted): Collection { $dated = []; $nondated = []; $sorted = []; // Split the array into dated and non-dated arrays $order = 0; foreach ($unsorted as $fact) { $fact->sortOrder = $order; $ord...
php
public static function sortFacts(Collection $unsorted): Collection { $dated = []; $nondated = []; $sorted = []; // Split the array into dated and non-dated arrays $order = 0; foreach ($unsorted as $fact) { $fact->sortOrder = $order; $ord...
[ "public", "static", "function", "sortFacts", "(", "Collection", "$", "unsorted", ")", ":", "Collection", "{", "$", "dated", "=", "[", "]", ";", "$", "nondated", "=", "[", "]", ";", "$", "sorted", "=", "[", "]", ";", "// Split the array into dated and non-d...
A multi-key sort 1. First divide the facts into two arrays one set with dates and one set without dates 2. Sort each of the two new arrays, the date using the compare date function, the non-dated using the compare type function 3. Then merge the arrays back into the original array using the compare type function @para...
[ "A", "multi", "-", "key", "sort", "1", ".", "First", "divide", "the", "facts", "into", "two", "arrays", "one", "set", "with", "dates", "and", "one", "set", "without", "dates", "2", ".", "Sort", "each", "of", "the", "two", "new", "arrays", "the", "dat...
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Fact.php#L700-L748
train
fisharebest/webtrees
app/Module/FanChartModule.php
FanChartModule.splitAlignText
protected function splitAlignText(string $data, int $maxlen): string { $RTLOrd = [ 215, 216, 217, 218, 219, ]; $lines = explode("\n", $data); // more than 1 line : recursive calls if (count($lines) > 1) { ...
php
protected function splitAlignText(string $data, int $maxlen): string { $RTLOrd = [ 215, 216, 217, 218, 219, ]; $lines = explode("\n", $data); // more than 1 line : recursive calls if (count($lines) > 1) { ...
[ "protected", "function", "splitAlignText", "(", "string", "$", "data", ",", "int", "$", "maxlen", ")", ":", "string", "{", "$", "RTLOrd", "=", "[", "215", ",", "216", ",", "217", ",", "218", ",", "219", ",", "]", ";", "$", "lines", "=", "explode", ...
split and center text by lines @param string $data input string @param int $maxlen max length of each line @return string $text output string
[ "split", "and", "center", "text", "by", "lines" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/FanChartModule.php#L388-L453
train
fisharebest/webtrees
app/Module/FanChartModule.php
FanChartModule.imageColor
protected function imageColor($image, string $css_color): int { return imagecolorallocate( $image, (int) hexdec(substr($css_color, 0, 2)), (int) hexdec(substr($css_color, 2, 2)), (int) hexdec(substr($css_color, 4, 2)) ); }
php
protected function imageColor($image, string $css_color): int { return imagecolorallocate( $image, (int) hexdec(substr($css_color, 0, 2)), (int) hexdec(substr($css_color, 2, 2)), (int) hexdec(substr($css_color, 4, 2)) ); }
[ "protected", "function", "imageColor", "(", "$", "image", ",", "string", "$", "css_color", ")", ":", "int", "{", "return", "imagecolorallocate", "(", "$", "image", ",", "(", "int", ")", "hexdec", "(", "substr", "(", "$", "css_color", ",", "0", ",", "2"...
Convert a CSS color into a GD color. @param resource $image @param string $css_color @return int
[ "Convert", "a", "CSS", "color", "into", "a", "GD", "color", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/FanChartModule.php#L463-L471
train
fisharebest/webtrees
app/Services/RomanNumeralsService.php
RomanNumeralsService.numberToRomanNumerals
public function numberToRomanNumerals(int $number): string { if ($number < 1) { // Cannot convert zero/negative numbers return (string) $number; } $roman = ''; foreach (self::ROMAN_NUMERALS as $key => $value) { while ($number >= $key) { ...
php
public function numberToRomanNumerals(int $number): string { if ($number < 1) { // Cannot convert zero/negative numbers return (string) $number; } $roman = ''; foreach (self::ROMAN_NUMERALS as $key => $value) { while ($number >= $key) { ...
[ "public", "function", "numberToRomanNumerals", "(", "int", "$", "number", ")", ":", "string", "{", "if", "(", "$", "number", "<", "1", ")", "{", "// Cannot convert zero/negative numbers", "return", "(", "string", ")", "$", "number", ";", "}", "$", "roman", ...
Convert a decimal number to roman numerals @param int $number @return string
[ "Convert", "a", "decimal", "number", "to", "roman", "numerals" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/RomanNumeralsService.php#L49-L64
train
fisharebest/webtrees
app/Services/RomanNumeralsService.php
RomanNumeralsService.romanNumeralsToNumber
public function romanNumeralsToNumber(string $roman): int { $num = 0; foreach (self::ROMAN_NUMERALS as $key => $value) { while (strpos($roman, $value) === 0) { $num += $key; $roman = substr($roman, strlen($value)); } } return $...
php
public function romanNumeralsToNumber(string $roman): int { $num = 0; foreach (self::ROMAN_NUMERALS as $key => $value) { while (strpos($roman, $value) === 0) { $num += $key; $roman = substr($roman, strlen($value)); } } return $...
[ "public", "function", "romanNumeralsToNumber", "(", "string", "$", "roman", ")", ":", "int", "{", "$", "num", "=", "0", ";", "foreach", "(", "self", "::", "ROMAN_NUMERALS", "as", "$", "key", "=>", "$", "value", ")", "{", "while", "(", "strpos", "(", ...
Convert a roman numeral to decimal @param string $roman @return int
[ "Convert", "a", "roman", "numeral", "to", "decimal" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/RomanNumeralsService.php#L73-L84
train
fisharebest/webtrees
app/Module/FamilyTreeFavoritesModule.php
FamilyTreeFavoritesModule.getFavorites
public function getFavorites(Tree $tree): array { return DB::table('favorite') ->where('gedcom_id', '=', $tree->id()) ->whereNull('user_id') ->get() ->map(static function (stdClass $row) use ($tree): stdClass { if ($row->xref !== null) { ...
php
public function getFavorites(Tree $tree): array { return DB::table('favorite') ->where('gedcom_id', '=', $tree->id()) ->whereNull('user_id') ->get() ->map(static function (stdClass $row) use ($tree): stdClass { if ($row->xref !== null) { ...
[ "public", "function", "getFavorites", "(", "Tree", "$", "tree", ")", ":", "array", "{", "return", "DB", "::", "table", "(", "'favorite'", ")", "->", "where", "(", "'gedcom_id'", ",", "'='", ",", "$", "tree", "->", "id", "(", ")", ")", "->", "whereNul...
Get the favorites for a family tree @param Tree $tree @return stdClass[]
[ "Get", "the", "favorites", "for", "a", "family", "tree" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/FamilyTreeFavoritesModule.php#L161-L177
train
fisharebest/webtrees
app/Module/BatchUpdateModule.php
BatchUpdateModule.getPluginList
private function getPluginList(): array { $plugins = []; $files = glob(__DIR__ . '/BatchUpdate/BatchUpdate*Plugin.php', GLOB_NOSORT); foreach ($files as $file) { $base_class = basename($file, '.php'); if ($base_class !== 'BatchUpdateBasePlugin') { ...
php
private function getPluginList(): array { $plugins = []; $files = glob(__DIR__ . '/BatchUpdate/BatchUpdate*Plugin.php', GLOB_NOSORT); foreach ($files as $file) { $base_class = basename($file, '.php'); if ($base_class !== 'BatchUpdateBasePlugin') { ...
[ "private", "function", "getPluginList", "(", ")", ":", "array", "{", "$", "plugins", "=", "[", "]", ";", "$", "files", "=", "glob", "(", "__DIR__", ".", "'/BatchUpdate/BatchUpdate*Plugin.php'", ",", "GLOB_NOSORT", ")", ";", "foreach", "(", "$", "files", "a...
Scan the plugin folder for a list of plugins @return BatchUpdateBasePlugin[]
[ "Scan", "the", "plugin", "folder", "for", "a", "list", "of", "plugins" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/BatchUpdateModule.php#L148-L163
train
fisharebest/webtrees
app/Module/BatchUpdateModule.php
BatchUpdateModule.allData
private function allData(BatchUpdateBasePlugin $plugin, Tree $tree): array { $tmp = []; foreach ($plugin->getRecordTypesToUpdate() as $type) { switch ($type) { case 'INDI': $rows = DB::table('individuals') ->where('i_file', '='...
php
private function allData(BatchUpdateBasePlugin $plugin, Tree $tree): array { $tmp = []; foreach ($plugin->getRecordTypesToUpdate() as $type) { switch ($type) { case 'INDI': $rows = DB::table('individuals') ->where('i_file', '='...
[ "private", "function", "allData", "(", "BatchUpdateBasePlugin", "$", "plugin", ",", "Tree", "$", "tree", ")", ":", "array", "{", "$", "tmp", "=", "[", "]", ";", "foreach", "(", "$", "plugin", "->", "getRecordTypesToUpdate", "(", ")", "as", "$", "type", ...
Fetch all records that might need updating. @param BatchUpdateBasePlugin $plugin @param Tree $tree @return object[]
[ "Fetch", "all", "records", "that", "might", "need", "updating", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/BatchUpdateModule.php#L173-L236
train
fisharebest/webtrees
app/Module/BatchUpdateModule.php
BatchUpdateModule.findNextXref
private function findNextXref(BatchUpdateBasePlugin $plugin, string $xref, array $all_data, Tree $tree): string { foreach (array_keys($all_data) as $key) { if ($key > $xref) { $record = $this->getRecord($all_data[$key], $tree); if ($plugin->doesRecordNeedUpdate($r...
php
private function findNextXref(BatchUpdateBasePlugin $plugin, string $xref, array $all_data, Tree $tree): string { foreach (array_keys($all_data) as $key) { if ($key > $xref) { $record = $this->getRecord($all_data[$key], $tree); if ($plugin->doesRecordNeedUpdate($r...
[ "private", "function", "findNextXref", "(", "BatchUpdateBasePlugin", "$", "plugin", ",", "string", "$", "xref", ",", "array", "$", "all_data", ",", "Tree", "$", "tree", ")", ":", "string", "{", "foreach", "(", "array_keys", "(", "$", "all_data", ")", "as",...
Find the next record that needs to be updated. @param BatchUpdateBasePlugin $plugin @param string $xref @param array $all_data @param Tree $tree @return string
[ "Find", "the", "next", "record", "that", "needs", "to", "be", "updated", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/BatchUpdateModule.php#L280-L292
train
fisharebest/webtrees
app/Module/BatchUpdateModule.php
BatchUpdateModule.findPrevXref
private function findPrevXref(BatchUpdateBasePlugin $plugin, string $xref, array $all_data, Tree $tree): string { foreach (array_reverse($all_data) as $key => $value) { if ($key > $xref) { $record = $this->getRecord($all_data[$key], $tree); if ($plugin->doesRecord...
php
private function findPrevXref(BatchUpdateBasePlugin $plugin, string $xref, array $all_data, Tree $tree): string { foreach (array_reverse($all_data) as $key => $value) { if ($key > $xref) { $record = $this->getRecord($all_data[$key], $tree); if ($plugin->doesRecord...
[ "private", "function", "findPrevXref", "(", "BatchUpdateBasePlugin", "$", "plugin", ",", "string", "$", "xref", ",", "array", "$", "all_data", ",", "Tree", "$", "tree", ")", ":", "string", "{", "foreach", "(", "array_reverse", "(", "$", "all_data", ")", "a...
Find the previous record that needs to be updated. @param BatchUpdateBasePlugin $plugin @param string $xref @param array $all_data @param Tree $tree @return string
[ "Find", "the", "previous", "record", "that", "needs", "to", "be", "updated", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/BatchUpdateModule.php#L304-L316
train
fisharebest/webtrees
app/Report/ReportBaseHtml.php
ReportBaseHtml.getStart
public function getStart(): string { $str = '<' . $this->tag . ' '; foreach ($this->attrs as $key => $value) { $str .= $key . '="' . $value . '" '; } $str .= '>'; return $str; }
php
public function getStart(): string { $str = '<' . $this->tag . ' '; foreach ($this->attrs as $key => $value) { $str .= $key . '="' . $value . '" '; } $str .= '>'; return $str; }
[ "public", "function", "getStart", "(", ")", ":", "string", "{", "$", "str", "=", "'<'", ".", "$", "this", "->", "tag", ".", "' '", ";", "foreach", "(", "$", "this", "->", "attrs", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "str", ".="...
Get the start tag. @return string
[ "Get", "the", "start", "tag", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportBaseHtml.php#L51-L60
train
fisharebest/webtrees
app/Report/ReportPdfPageheader.php
ReportPdfPageheader.render
public function render($renderer) { $renderer->clearPageHeader(); foreach ($this->elements as $element) { $renderer->addPageHeader($element); } }
php
public function render($renderer) { $renderer->clearPageHeader(); foreach ($this->elements as $element) { $renderer->addPageHeader($element); } }
[ "public", "function", "render", "(", "$", "renderer", ")", "{", "$", "renderer", "->", "clearPageHeader", "(", ")", ";", "foreach", "(", "$", "this", "->", "elements", "as", "$", "element", ")", "{", "$", "renderer", "->", "addPageHeader", "(", "$", "e...
PageHeader element renderer @param ReportTcpdf $renderer @return void
[ "PageHeader", "element", "renderer" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportPdfPageheader.php#L32-L38
train
fisharebest/webtrees
app/Http/Controllers/Admin/MediaController.php
MediaController.allMediaFolders
private function allMediaFolders(): Collection { $base_folders = DB::table('gedcom_setting') ->where('setting_name', '=', 'MEDIA_DIRECTORY') ->select(DB::raw("setting_value || 'dummy.jpeg' AS path")); return DB::table('media_file') ->join('gedcom_setting', 'gedco...
php
private function allMediaFolders(): Collection { $base_folders = DB::table('gedcom_setting') ->where('setting_name', '=', 'MEDIA_DIRECTORY') ->select(DB::raw("setting_value || 'dummy.jpeg' AS path")); return DB::table('media_file') ->join('gedcom_setting', 'gedco...
[ "private", "function", "allMediaFolders", "(", ")", ":", "Collection", "{", "$", "base_folders", "=", "DB", "::", "table", "(", "'gedcom_setting'", ")", "->", "where", "(", "'setting_name'", ",", "'='", ",", "'MEDIA_DIRECTORY'", ")", "->", "select", "(", "DB...
Generate a list of all folders from all the trees. @return Collection @return string[]
[ "Generate", "a", "list", "of", "all", "folders", "from", "all", "the", "trees", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Admin/MediaController.php#L93-L116
train
fisharebest/webtrees
app/Http/Controllers/Admin/MediaController.php
MediaController.allDiskFiles
private function allDiskFiles(string $media_folder, string $subfolders): array { return $this->scanFolders(WT_DATA_DIR . $media_folder, $subfolders === 'include'); }
php
private function allDiskFiles(string $media_folder, string $subfolders): array { return $this->scanFolders(WT_DATA_DIR . $media_folder, $subfolders === 'include'); }
[ "private", "function", "allDiskFiles", "(", "string", "$", "media_folder", ",", "string", "$", "subfolders", ")", ":", "array", "{", "return", "$", "this", "->", "scanFolders", "(", "WT_DATA_DIR", ".", "$", "media_folder", ",", "$", "subfolders", "===", "'in...
Fetch a list of all files on disk @param string $media_folder Location of root folder @param string $subfolders Include or exclude subfolders @return string[]
[ "Fetch", "a", "list", "of", "all", "files", "on", "disk" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Admin/MediaController.php#L153-L156
train
fisharebest/webtrees
app/Http/Controllers/Admin/MediaController.php
MediaController.mediaObjectInfo
private function mediaObjectInfo(Media $media): string { $html = '<b><a href="' . e($media->url()) . '">' . $media->fullName() . '</a></b>' . '<br><i>' . e($media->getNote()) . '</i></br><br>'; $linked = []; foreach ($media->linkedIndividuals('OBJE') as $link) { $linked[] = '<a ...
php
private function mediaObjectInfo(Media $media): string { $html = '<b><a href="' . e($media->url()) . '">' . $media->fullName() . '</a></b>' . '<br><i>' . e($media->getNote()) . '</i></br><br>'; $linked = []; foreach ($media->linkedIndividuals('OBJE') as $link) { $linked[] = '<a ...
[ "private", "function", "mediaObjectInfo", "(", "Media", "$", "media", ")", ":", "string", "{", "$", "html", "=", "'<b><a href=\"'", ".", "e", "(", "$", "media", "->", "url", "(", ")", ")", ".", "'\">'", ".", "$", "media", "->", "fullName", "(", ")", ...
Generate some useful information and links about a media object. @param Media $media @return string HTML
[ "Generate", "some", "useful", "information", "and", "links", "about", "a", "media", "object", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Admin/MediaController.php#L382-L415
train
fisharebest/webtrees
app/Http/Controllers/Admin/MediaController.php
MediaController.allMediaFiles
private function allMediaFiles(string $media_folder, string $subfolders): array { $query = DB::table('media_file') ->join('gedcom_setting', 'gedcom_id', '=', 'm_file') ->where('setting_name', '=', 'MEDIA_DIRECTORY') ->where('multimedia_file_refn', 'LIKE', '%/%') ...
php
private function allMediaFiles(string $media_folder, string $subfolders): array { $query = DB::table('media_file') ->join('gedcom_setting', 'gedcom_id', '=', 'm_file') ->where('setting_name', '=', 'MEDIA_DIRECTORY') ->where('multimedia_file_refn', 'LIKE', '%/%') ...
[ "private", "function", "allMediaFiles", "(", "string", "$", "media_folder", ",", "string", "$", "subfolders", ")", ":", "array", "{", "$", "query", "=", "DB", "::", "table", "(", "'media_file'", ")", "->", "join", "(", "'gedcom_setting'", ",", "'gedcom_id'",...
Fetch a list of all files on in the database. @param string $media_folder @param string $subfolders @return string[]
[ "Fetch", "a", "list", "of", "all", "files", "on", "in", "the", "database", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Admin/MediaController.php#L425-L442
train
fisharebest/webtrees
app/Mail.php
Mail.send
public static function send(UserInterface $from, UserInterface $to, UserInterface $reply_to, $subject, $message_text, $message_html): bool { try { $message_text = preg_replace('/\r?\n/', "\r\n", $message_text); $message_html = preg_replace('/\r?\n/', "\r\n", $message_html); ...
php
public static function send(UserInterface $from, UserInterface $to, UserInterface $reply_to, $subject, $message_text, $message_html): bool { try { $message_text = preg_replace('/\r?\n/', "\r\n", $message_text); $message_html = preg_replace('/\r?\n/', "\r\n", $message_html); ...
[ "public", "static", "function", "send", "(", "UserInterface", "$", "from", ",", "UserInterface", "$", "to", ",", "UserInterface", "$", "reply_to", ",", "$", "subject", ",", "$", "message_text", ",", "$", "message_html", ")", ":", "bool", "{", "try", "{", ...
Send an external email message Caution! gmail may rewrite the "From" header unless you have added the address to your account. @param UserInterface $from @param UserInterface $to @param UserInterface $reply_to @param string $subject @param string $message_text @param string $message_html @return ...
[ "Send", "an", "external", "email", "message", "Caution!", "gmail", "may", "rewrite", "the", "From", "header", "unless", "you", "have", "added", "the", "address", "to", "your", "account", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Mail.php#L47-L69
train
fisharebest/webtrees
app/Mail.php
Mail.transport
public static function transport(): Swift_Transport { switch (Site::getPreference('SMTP_ACTIVE')) { case 'sendmail': // Local sendmail (requires PHP proc_* functions) return new Swift_SendmailTransport(); case 'external': // SMTP ...
php
public static function transport(): Swift_Transport { switch (Site::getPreference('SMTP_ACTIVE')) { case 'sendmail': // Local sendmail (requires PHP proc_* functions) return new Swift_SendmailTransport(); case 'external': // SMTP ...
[ "public", "static", "function", "transport", "(", ")", ":", "Swift_Transport", "{", "switch", "(", "Site", "::", "getPreference", "(", "'SMTP_ACTIVE'", ")", ")", "{", "case", "'sendmail'", ":", "// Local sendmail (requires PHP proc_* functions)", "return", "new", "S...
Create a transport mechanism for sending mail @return Swift_Transport
[ "Create", "a", "transport", "mechanism", "for", "sending", "mail" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Mail.php#L76-L108
train
fisharebest/webtrees
app/Functions/FunctionsEdit.php
FunctionsEdit.optionsRestrictions
public static function optionsRestrictions($include_empty): array { $options = [ 'none' => I18N::translate('Show to visitors'), 'privacy' => I18N::translate('Show to members'), 'confidential' => I18N::translate('Show to managers'), 'locked' ...
php
public static function optionsRestrictions($include_empty): array { $options = [ 'none' => I18N::translate('Show to visitors'), 'privacy' => I18N::translate('Show to members'), 'confidential' => I18N::translate('Show to managers'), 'locked' ...
[ "public", "static", "function", "optionsRestrictions", "(", "$", "include_empty", ")", ":", "array", "{", "$", "options", "=", "[", "'none'", "=>", "I18N", "::", "translate", "(", "'Show to visitors'", ")", ",", "'privacy'", "=>", "I18N", "::", "translate", ...
A list of GEDCOM restrictions for inline data. @param bool $include_empty @return string[]
[ "A", "list", "of", "GEDCOM", "restrictions", "for", "inline", "data", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Functions/FunctionsEdit.php#L225-L239
train
fisharebest/webtrees
app/Functions/FunctionsEdit.php
FunctionsEdit.optionsRestrictionsRule
public static function optionsRestrictionsRule(): array { $options = [ 'none' => I18N::translate('Show to visitors'), 'privacy' => I18N::translate('Show to members'), 'confidential' => I18N::translate('Show to managers'), 'hidden' => I18N::t...
php
public static function optionsRestrictionsRule(): array { $options = [ 'none' => I18N::translate('Show to visitors'), 'privacy' => I18N::translate('Show to members'), 'confidential' => I18N::translate('Show to managers'), 'hidden' => I18N::t...
[ "public", "static", "function", "optionsRestrictionsRule", "(", ")", ":", "array", "{", "$", "options", "=", "[", "'none'", "=>", "I18N", "::", "translate", "(", "'Show to visitors'", ")", ",", "'privacy'", "=>", "I18N", "::", "translate", "(", "'Show to membe...
A list of GEDCOM restrictions for privacy rules. @return string[]
[ "A", "list", "of", "GEDCOM", "restrictions", "for", "privacy", "rules", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Functions/FunctionsEdit.php#L246-L256
train
fisharebest/webtrees
app/Functions/FunctionsEdit.php
FunctionsEdit.addSimpleTags
public static function addSimpleTags(Tree $tree, $fact): void { // For new individuals, these facts default to "Y" if ($fact === 'MARR') { echo self::addSimpleTag($tree, '0 ' . $fact . ' Y'); } else { echo self::addSimpleTag($tree, '0 ' . $fact); } if...
php
public static function addSimpleTags(Tree $tree, $fact): void { // For new individuals, these facts default to "Y" if ($fact === 'MARR') { echo self::addSimpleTag($tree, '0 ' . $fact . ' Y'); } else { echo self::addSimpleTag($tree, '0 ' . $fact); } if...
[ "public", "static", "function", "addSimpleTags", "(", "Tree", "$", "tree", ",", "$", "fact", ")", ":", "void", "{", "// For new individuals, these facts default to \"Y\"", "if", "(", "$", "fact", "===", "'MARR'", ")", "{", "echo", "self", "::", "addSimpleTag", ...
Add some empty tags to create a new fact. @param Tree $tree @param string $fact @return void
[ "Add", "some", "empty", "tags", "to", "create", "a", "new", "fact", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Functions/FunctionsEdit.php#L639-L665
train
fisharebest/webtrees
app/Functions/FunctionsEdit.php
FunctionsEdit.createAddForm
public static function createAddForm(Tree $tree, $fact): void { self::$tags = []; // handle MARRiage TYPE if (substr($fact, 0, 5) === 'MARR_') { self::$tags[0] = 'MARR'; echo self::addSimpleTag($tree, '1 MARR'); self::insertMissingSubtags($tree, $fact); ...
php
public static function createAddForm(Tree $tree, $fact): void { self::$tags = []; // handle MARRiage TYPE if (substr($fact, 0, 5) === 'MARR_') { self::$tags[0] = 'MARR'; echo self::addSimpleTag($tree, '1 MARR'); self::insertMissingSubtags($tree, $fact); ...
[ "public", "static", "function", "createAddForm", "(", "Tree", "$", "tree", ",", "$", "fact", ")", ":", "void", "{", "self", "::", "$", "tags", "=", "[", "]", ";", "// handle MARRiage TYPE", "if", "(", "substr", "(", "$", "fact", ",", "0", ",", "5", ...
builds the form for adding new facts @param Tree $tree @param string $fact the new fact we are adding @return void
[ "builds", "the", "form", "for", "adding", "new", "facts" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Functions/FunctionsEdit.php#L675-L713
train
fisharebest/webtrees
app/Note.php
Note.getNote
public function getNote(): string { if (preg_match('/^0 @' . Gedcom::REGEX_XREF . '@ NOTE ?(.*(?:\n1 CONT ?.*)*)/', $this->gedcom . $this->pending, $match)) { return preg_replace("/\n1 CONT ?/", "\n", $match[1]); } return ''; }
php
public function getNote(): string { if (preg_match('/^0 @' . Gedcom::REGEX_XREF . '@ NOTE ?(.*(?:\n1 CONT ?.*)*)/', $this->gedcom . $this->pending, $match)) { return preg_replace("/\n1 CONT ?/", "\n", $match[1]); } return ''; }
[ "public", "function", "getNote", "(", ")", ":", "string", "{", "if", "(", "preg_match", "(", "'/^0 @'", ".", "Gedcom", "::", "REGEX_XREF", ".", "'@ NOTE ?(.*(?:\\n1 CONT ?.*)*)/'", ",", "$", "this", "->", "gedcom", ".", "$", "this", "->", "pending", ",", "...
Get the text contents of the note @return string
[ "Get", "the", "text", "contents", "of", "the", "note" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Note.php#L76-L83
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.whereFamily
private function whereFamily(bool $fams, Builder $query): void { if ($fams) { $query->join('link', static function (JoinClause $join): void { $join ->on('l_from', '=', 'n_id') ->on('l_file', '=', 'n_file') ->where('l_typ...
php
private function whereFamily(bool $fams, Builder $query): void { if ($fams) { $query->join('link', static function (JoinClause $join): void { $join ->on('l_from', '=', 'n_id') ->on('l_file', '=', 'n_file') ->where('l_typ...
[ "private", "function", "whereFamily", "(", "bool", "$", "fams", ",", "Builder", "$", "query", ")", ":", "void", "{", "if", "(", "$", "fams", ")", "{", "$", "query", "->", "join", "(", "'link'", ",", "static", "function", "(", "JoinClause", "$", "join...
Restrict a query to individuals that are a spouse in a family record. @param bool $fams @param Builder $query
[ "Restrict", "a", "query", "to", "individuals", "that", "are", "a", "spouse", "in", "a", "family", "record", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L59-L69
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.surnameAlpha
public function surnameAlpha(bool $marnm, bool $fams, string $locale, string $collation): array { $n_surn = $this->fieldWithCollation('n_surn', $collation); $alphas = []; $query = DB::table('name')->where('n_file', '=', $this->tree->id()); $this->whereFamily($fams, $query); ...
php
public function surnameAlpha(bool $marnm, bool $fams, string $locale, string $collation): array { $n_surn = $this->fieldWithCollation('n_surn', $collation); $alphas = []; $query = DB::table('name')->where('n_file', '=', $this->tree->id()); $this->whereFamily($fams, $query); ...
[ "public", "function", "surnameAlpha", "(", "bool", "$", "marnm", ",", "bool", "$", "fams", ",", "string", "$", "locale", ",", "string", "$", "collation", ")", ":", "array", "{", "$", "n_surn", "=", "$", "this", "->", "fieldWithCollation", "(", "'n_surn'"...
Get a list of initial surname letters. @param bool $marnm if set, include married names @param bool $fams if set, only consider individuals with FAMS records @param string $locale @param string $collation @return int[]
[ "Get", "a", "list", "of", "initial", "surname", "letters", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L94-L142
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.givenAlpha
public function givenAlpha(string $surn, string $salpha, bool $marnm, bool $fams, string $locale, string $collation): array { $alphas = []; $query = DB::table('name') ->where('n_file', '=', $this->tree->id()); $this->whereFamily($fams, $query); $this->whereMarriedName($...
php
public function givenAlpha(string $surn, string $salpha, bool $marnm, bool $fams, string $locale, string $collation): array { $alphas = []; $query = DB::table('name') ->where('n_file', '=', $this->tree->id()); $this->whereFamily($fams, $query); $this->whereMarriedName($...
[ "public", "function", "givenAlpha", "(", "string", "$", "surn", ",", "string", "$", "salpha", ",", "bool", "$", "marnm", ",", "bool", "$", "fams", ",", "string", "$", "locale", ",", "string", "$", "collation", ")", ":", "array", "{", "$", "alphas", "...
Get a list of initial given name letters for indilist.php and famlist.php @param string $surn if set, only consider people with this surname @param string $salpha if set, only consider surnames starting with this letter @param bool $marnm if set, include married names @param bool $fams if set, only consider i...
[ "Get", "a", "list", "of", "initial", "given", "name", "letters", "for", "indilist", ".", "php", "and", "famlist", ".", "php" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L156-L204
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.surnames
public function surnames(string $surn, string $salpha, bool $marnm, bool $fams, string $locale, string $collation): array { $query = DB::table('name') ->where('n_file', '=', $this->tree->id()) ->select([ DB::raw('UPPER(n_surn /*! COLLATE ' . I18N::collation() . ' */) ...
php
public function surnames(string $surn, string $salpha, bool $marnm, bool $fams, string $locale, string $collation): array { $query = DB::table('name') ->where('n_file', '=', $this->tree->id()) ->select([ DB::raw('UPPER(n_surn /*! COLLATE ' . I18N::collation() . ' */) ...
[ "public", "function", "surnames", "(", "string", "$", "surn", ",", "string", "$", "salpha", ",", "bool", "$", "marnm", ",", "bool", "$", "fams", ",", "string", "$", "locale", ",", "string", "$", "collation", ")", ":", "array", "{", "$", "query", "=",...
Get a count of actual surnames and variants, based on a "root" surname. @param string $surn if set, only count people with this surname @param string $salpha if set, only consider surnames starting with this letter @param bool $marnm if set, include married names @param bool $fams if set, only consider indivi...
[ "Get", "a", "count", "of", "actual", "surnames", "and", "variants", "based", "on", "a", "root", "surname", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L218-L255
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.fieldWithCollation
private function fieldWithCollation(string $field, string $collation): Expression { return DB::raw($field . ' /*! COLLATE ' . $collation . ' */'); }
php
private function fieldWithCollation(string $field, string $collation): Expression { return DB::raw($field . ' /*! COLLATE ' . $collation . ' */'); }
[ "private", "function", "fieldWithCollation", "(", "string", "$", "field", ",", "string", "$", "collation", ")", ":", "Expression", "{", "return", "DB", "::", "raw", "(", "$", "field", ".", "' /*! COLLATE '", ".", "$", "collation", ".", "' */'", ")", ";", ...
Use MySQL-specific comments so we can run these queries on other RDBMS. @param string $field @param string $collation @return Expression
[ "Use", "MySQL", "-", "specific", "comments", "so", "we", "can", "run", "these", "queries", "on", "other", "RDBMS", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L365-L368
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.whereInitial
private function whereInitial(Builder $query, string $field, string $letter, string $locale, string $collation): void { // Use MySQL-specific comments so we can run these queries on other RDBMS. $field_with_collation = $this->fieldWithCollation($field, $collation); switch ($locale) { ...
php
private function whereInitial(Builder $query, string $field, string $letter, string $locale, string $collation): void { // Use MySQL-specific comments so we can run these queries on other RDBMS. $field_with_collation = $this->fieldWithCollation($field, $collation); switch ($locale) { ...
[ "private", "function", "whereInitial", "(", "Builder", "$", "query", ",", "string", "$", "field", ",", "string", "$", "letter", ",", "string", "$", "locale", ",", "string", "$", "collation", ")", ":", "void", "{", "// Use MySQL-specific comments so we can run th...
Modify a query to restrict a field to a given initial letter. Take account of digraphs, equialent letters, etc. @param Builder $query @param string $field @param string $letter @param string $locale @param string $collation @return void
[ "Modify", "a", "query", "to", "restrict", "a", "field", "to", "a", "given", "initial", "letter", ".", "Take", "account", "of", "digraphs", "equialent", "letters", "etc", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L382-L414
train
fisharebest/webtrees
app/Services/IndividualListService.php
IndividualListService.whereInitialHungarian
private function whereInitialHungarian(Builder $query, Expression $field, string $letter): void { switch ($letter) { case 'C': $query->where($field, 'LIKE', 'C%')->where($field, 'NOT LIKE', 'CS%'); break; case 'D': $query->where($field...
php
private function whereInitialHungarian(Builder $query, Expression $field, string $letter): void { switch ($letter) { case 'C': $query->where($field, 'LIKE', 'C%')->where($field, 'NOT LIKE', 'CS%'); break; case 'D': $query->where($field...
[ "private", "function", "whereInitialHungarian", "(", "Builder", "$", "query", ",", "Expression", "$", "field", ",", "string", "$", "letter", ")", ":", "void", "{", "switch", "(", "$", "letter", ")", "{", "case", "'C'", ":", "$", "query", "->", "where", ...
Hungarian has many digraphs and trigraphs, so exclude these from prefixes. @param Builder $query @param Expression $field @param string $letter
[ "Hungarian", "has", "many", "digraphs", "and", "trigraphs", "so", "exclude", "these", "from", "prefixes", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Services/IndividualListService.php#L459-L502
train
fisharebest/webtrees
app/GedcomCode/GedcomCodeRela.php
GedcomCodeRela.getValues
public static function getValues(GedcomRecord $record = null): array { $values = []; foreach (self::TYPES as $type) { $values[$type] = self::getValue($type, $record); } uasort($values, '\Fisharebest\Webtrees\I18N::strcasecmp'); return $values; }
php
public static function getValues(GedcomRecord $record = null): array { $values = []; foreach (self::TYPES as $type) { $values[$type] = self::getValue($type, $record); } uasort($values, '\Fisharebest\Webtrees\I18N::strcasecmp'); return $values; }
[ "public", "static", "function", "getValues", "(", "GedcomRecord", "$", "record", "=", "null", ")", ":", "array", "{", "$", "values", "=", "[", "]", ";", "foreach", "(", "self", "::", "TYPES", "as", "$", "type", ")", "{", "$", "values", "[", "$", "t...
A list of all possible values for RELA @param GedcomRecord|null $record @return string[]
[ "A", "list", "of", "all", "possible", "values", "for", "RELA" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/GedcomCode/GedcomCodeRela.php#L362-L371
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.commonGivenQuery
private function commonGivenQuery(string $sex, string $type, bool $show_tot, int $threshold, int $maxtoshow) { $query = DB::table('name') ->join('individuals', static function (JoinClause $join): void { $join ->on('i_file', '=', 'n_file') -...
php
private function commonGivenQuery(string $sex, string $type, bool $show_tot, int $threshold, int $maxtoshow) { $query = DB::table('name') ->join('individuals', static function (JoinClause $join): void { $join ->on('i_file', '=', 'n_file') -...
[ "private", "function", "commonGivenQuery", "(", "string", "$", "sex", ",", "string", "$", "type", ",", "bool", "$", "show_tot", ",", "int", "$", "threshold", ",", "int", "$", "maxtoshow", ")", "{", "$", "query", "=", "DB", "::", "table", "(", "'name'",...
Find common given names. @param string $sex @param string $type @param bool $show_tot @param int $threshold @param int $maxtoshow @return string|int[]
[ "Find", "common", "given", "names", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L81-L163
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.statsBirthBySexQuery
public function statsBirthBySexQuery(int $year1 = -1, int $year2 = -1): Builder { return $this->statsBirthQuery($year1, $year2) ->select(['d_month', 'i_sex', DB::raw('COUNT(*) AS total')]) ->join('individuals', static function (JoinClause $join): void { $j...
php
public function statsBirthBySexQuery(int $year1 = -1, int $year2 = -1): Builder { return $this->statsBirthQuery($year1, $year2) ->select(['d_month', 'i_sex', DB::raw('COUNT(*) AS total')]) ->join('individuals', static function (JoinClause $join): void { $j...
[ "public", "function", "statsBirthBySexQuery", "(", "int", "$", "year1", "=", "-", "1", ",", "int", "$", "year2", "=", "-", "1", ")", ":", "Builder", "{", "return", "$", "this", "->", "statsBirthQuery", "(", "$", "year1", ",", "$", "year2", ")", "->",...
Get a count of births by month. @param int $year1 @param int $year2 @return Builder
[ "Get", "a", "count", "of", "births", "by", "month", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L679-L689
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.statsBirth
public function statsBirth(string $color_from = null, string $color_to = null): string { return (new ChartBirth($this->tree)) ->chartBirth($color_from, $color_to); }
php
public function statsBirth(string $color_from = null, string $color_to = null): string { return (new ChartBirth($this->tree)) ->chartBirth($color_from, $color_to); }
[ "public", "function", "statsBirth", "(", "string", "$", "color_from", "=", "null", ",", "string", "$", "color_to", "=", "null", ")", ":", "string", "{", "return", "(", "new", "ChartBirth", "(", "$", "this", "->", "tree", ")", ")", "->", "chartBirth", "...
General query on births. @param string|null $color_from @param string|null $color_to @return string
[ "General", "query", "on", "births", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L699-L703
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.statsDeathBySexQuery
public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder { return $this->statsDeathQuery($year1, $year2) ->select(['d_month', 'i_sex', DB::raw('COUNT(*) AS total')]) ->join('individuals', static function (JoinClause $join): void { $j...
php
public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder { return $this->statsDeathQuery($year1, $year2) ->select(['d_month', 'i_sex', DB::raw('COUNT(*) AS total')]) ->join('individuals', static function (JoinClause $join): void { $j...
[ "public", "function", "statsDeathBySexQuery", "(", "int", "$", "year1", "=", "-", "1", ",", "int", "$", "year2", "=", "-", "1", ")", ":", "Builder", "{", "return", "$", "this", "->", "statsDeathQuery", "(", "$", "year1", ",", "$", "year2", ")", "->",...
Get a list of death dates. @param int $year1 @param int $year2 @return Builder
[ "Get", "a", "list", "of", "death", "dates", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L737-L747
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.statsDeath
public function statsDeath(string $color_from = null, string $color_to = null): string { return (new ChartDeath($this->tree)) ->chartDeath($color_from, $color_to); }
php
public function statsDeath(string $color_from = null, string $color_to = null): string { return (new ChartDeath($this->tree)) ->chartDeath($color_from, $color_to); }
[ "public", "function", "statsDeath", "(", "string", "$", "color_from", "=", "null", ",", "string", "$", "color_to", "=", "null", ")", ":", "string", "{", "return", "(", "new", "ChartDeath", "(", "$", "this", "->", "tree", ")", ")", "->", "chartDeath", "...
General query on deaths. @param string|null $color_from @param string|null $color_to @return string
[ "General", "query", "on", "deaths", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L757-L761
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.statsAgeQuery
public function statsAgeQuery(string $related = 'BIRT', string $sex = 'BOTH', int $year1 = -1, int $year2 = -1) { $prefix = DB::connection()->getTablePrefix(); $query = $this->birthAndDeathQuery($sex); if ($year1 >= 0 && $year2 >= 0) { $query ->whereIn('birth.d_...
php
public function statsAgeQuery(string $related = 'BIRT', string $sex = 'BOTH', int $year1 = -1, int $year2 = -1) { $prefix = DB::connection()->getTablePrefix(); $query = $this->birthAndDeathQuery($sex); if ($year1 >= 0 && $year2 >= 0) { $query ->whereIn('birth.d_...
[ "public", "function", "statsAgeQuery", "(", "string", "$", "related", "=", "'BIRT'", ",", "string", "$", "sex", "=", "'BOTH'", ",", "int", "$", "year1", "=", "-", "1", ",", "int", "$", "year2", "=", "-", "1", ")", "{", "$", "prefix", "=", "DB", "...
General query on ages. @param string $related @param string $sex @param int $year1 @param int $year2 @return array|string
[ "General", "query", "on", "ages", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L773-L796
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.topTenOldestFemale
public function topTenOldestFemale(int $total = 10): string { $records = $this->topTenOldestQuery('F', $total); return view('statistics/individuals/top10-nolist', [ 'records' => $records, ]); }
php
public function topTenOldestFemale(int $total = 10): string { $records = $this->topTenOldestQuery('F', $total); return view('statistics/individuals/top10-nolist', [ 'records' => $records, ]); }
[ "public", "function", "topTenOldestFemale", "(", "int", "$", "total", "=", "10", ")", ":", "string", "{", "$", "records", "=", "$", "this", "->", "topTenOldestQuery", "(", "'F'", ",", "$", "total", ")", ";", "return", "view", "(", "'statistics/individuals/...
Find the oldest females. @param int $total @return string
[ "Find", "the", "oldest", "females", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1033-L1040
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.topTenOldestFemaleList
public function topTenOldestFemaleList(int $total = 10): string { $records = $this->topTenOldestQuery('F', $total); return view('statistics/individuals/top10-list', [ 'records' => $records, ]); }
php
public function topTenOldestFemaleList(int $total = 10): string { $records = $this->topTenOldestQuery('F', $total); return view('statistics/individuals/top10-list', [ 'records' => $records, ]); }
[ "public", "function", "topTenOldestFemaleList", "(", "int", "$", "total", "=", "10", ")", ":", "string", "{", "$", "records", "=", "$", "this", "->", "topTenOldestQuery", "(", "'F'", ",", "$", "total", ")", ";", "return", "view", "(", "'statistics/individu...
Find the oldest living females. @param int $total @return string
[ "Find", "the", "oldest", "living", "females", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1049-L1056
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.averageLifespanQuery
private function averageLifespanQuery(string $sex, bool $show_years): string { $prefix = DB::connection()->getTablePrefix(); $days = (int) $this->birthAndDeathQuery($sex) ->select(DB::raw('AVG(' . $prefix . 'death.d_julianday2 - ' . $prefix . 'birth.d_julianday1) AS days')) ...
php
private function averageLifespanQuery(string $sex, bool $show_years): string { $prefix = DB::connection()->getTablePrefix(); $days = (int) $this->birthAndDeathQuery($sex) ->select(DB::raw('AVG(' . $prefix . 'death.d_julianday2 - ' . $prefix . 'birth.d_julianday1) AS days')) ...
[ "private", "function", "averageLifespanQuery", "(", "string", "$", "sex", ",", "bool", "$", "show_years", ")", ":", "string", "{", "$", "prefix", "=", "DB", "::", "connection", "(", ")", "->", "getTablePrefix", "(", ")", ";", "$", "days", "=", "(", "in...
Find the average lifespan. @param string $sex "M", "F" or "BOTH" @param bool $show_years @return string
[ "Find", "the", "average", "lifespan", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1262-L1275
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.getPercentage
private function getPercentage(int $count, int $total): string { return ($total !== 0) ? I18N::percentage($count / $total, 1) : ''; }
php
private function getPercentage(int $count, int $total): string { return ($total !== 0) ? I18N::percentage($count / $total, 1) : ''; }
[ "private", "function", "getPercentage", "(", "int", "$", "count", ",", "int", "$", "total", ")", ":", "string", "{", "return", "(", "$", "total", "!==", "0", ")", "?", "I18N", "::", "percentage", "(", "$", "count", "/", "$", "total", ",", "1", ")",...
Convert totals into percentages. @param int $count @param int $total @return string
[ "Convert", "totals", "into", "percentages", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1321-L1324
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.totalLivingQuery
private function totalLivingQuery(): int { $query = DB::table('individuals') ->where('i_file', '=', $this->tree->id()); foreach (Gedcom::DEATH_EVENTS as $death_event) { $query->where('i_gedcom', 'NOT LIKE', "%\n1 " . $death_event . '%'); } return $query->cou...
php
private function totalLivingQuery(): int { $query = DB::table('individuals') ->where('i_file', '=', $this->tree->id()); foreach (Gedcom::DEATH_EVENTS as $death_event) { $query->where('i_gedcom', 'NOT LIKE', "%\n1 " . $death_event . '%'); } return $query->cou...
[ "private", "function", "totalLivingQuery", "(", ")", ":", "int", "{", "$", "query", "=", "DB", "::", "table", "(", "'individuals'", ")", "->", "where", "(", "'i_file'", ",", "'='", ",", "$", "this", "->", "tree", "->", "id", "(", ")", ")", ";", "fo...
Count the number of living individuals. The totalLiving/totalDeceased queries assume that every dead person will have a DEAT record. It will not include individuals who were born more than MAX_ALIVE_AGE years ago, and who have no DEAT record. A good reason to run the “Add missing DEAT records” batch-update! @return i...
[ "Count", "the", "number", "of", "living", "individuals", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1348-L1358
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.totalDeceasedQuery
private function totalDeceasedQuery(): int { return DB::table('individuals') ->where('i_file', '=', $this->tree->id()) ->where(static function (Builder $query): void { foreach (Gedcom::DEATH_EVENTS as $death_event) { $query->orWhere('i_gedcom', 'LI...
php
private function totalDeceasedQuery(): int { return DB::table('individuals') ->where('i_file', '=', $this->tree->id()) ->where(static function (Builder $query): void { foreach (Gedcom::DEATH_EVENTS as $death_event) { $query->orWhere('i_gedcom', 'LI...
[ "private", "function", "totalDeceasedQuery", "(", ")", ":", "int", "{", "return", "DB", "::", "table", "(", "'individuals'", ")", "->", "where", "(", "'i_file'", ",", "'='", ",", "$", "this", "->", "tree", "->", "id", "(", ")", ")", "->", "where", "(...
Count the number of dead individuals. @return int
[ "Count", "the", "number", "of", "dead", "individuals", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1365-L1375
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.getTotalSexQuery
private function getTotalSexQuery(string $sex): int { return DB::table('individuals') ->where('i_file', '=', $this->tree->id()) ->where('i_sex', '=', $sex) ->count(); }
php
private function getTotalSexQuery(string $sex): int { return DB::table('individuals') ->where('i_file', '=', $this->tree->id()) ->where('i_sex', '=', $sex) ->count(); }
[ "private", "function", "getTotalSexQuery", "(", "string", "$", "sex", ")", ":", "int", "{", "return", "DB", "::", "table", "(", "'individuals'", ")", "->", "where", "(", "'i_file'", ",", "'='", ",", "$", "this", "->", "tree", "->", "id", "(", ")", ")...
Returns the total count of a specific sex. @param string $sex The sex to query @return int
[ "Returns", "the", "total", "count", "of", "a", "specific", "sex", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1384-L1390
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.totalIndisWithSourcesQuery
private function totalIndisWithSourcesQuery(): int { return DB::table('individuals') ->select(['i_id']) ->distinct() ->join('link', static function (JoinClause $join): void { $join->on('i_id', '=', 'l_from') ->on('i_file', '=', 'l_file'...
php
private function totalIndisWithSourcesQuery(): int { return DB::table('individuals') ->select(['i_id']) ->distinct() ->join('link', static function (JoinClause $join): void { $join->on('i_id', '=', 'l_from') ->on('i_file', '=', 'l_file'...
[ "private", "function", "totalIndisWithSourcesQuery", "(", ")", ":", "int", "{", "return", "DB", "::", "table", "(", "'individuals'", ")", "->", "select", "(", "[", "'i_id'", "]", ")", "->", "distinct", "(", ")", "->", "join", "(", "'link'", ",", "static"...
How many individuals have one or more sources. @return int
[ "How", "many", "individuals", "have", "one", "or", "more", "sources", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1439-L1451
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.totalRecordsQuery
private function totalRecordsQuery(): int { return $this->totalIndividualsQuery() + $this->totalFamiliesQuery() + $this->totalNotesQuery() + $this->totalRepositoriesQuery() + $this->totalSourcesQuery(); }
php
private function totalRecordsQuery(): int { return $this->totalIndividualsQuery() + $this->totalFamiliesQuery() + $this->totalNotesQuery() + $this->totalRepositoriesQuery() + $this->totalSourcesQuery(); }
[ "private", "function", "totalRecordsQuery", "(", ")", ":", "int", "{", "return", "$", "this", "->", "totalIndividualsQuery", "(", ")", "+", "$", "this", "->", "totalFamiliesQuery", "(", ")", "+", "$", "this", "->", "totalNotesQuery", "(", ")", "+", "$", ...
Returns the total number of records. @return int
[ "Returns", "the", "total", "number", "of", "records", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1515-L1522
train
fisharebest/webtrees
app/Statistics/Repository/IndividualRepository.php
IndividualRepository.birthAndDeathQuery
private function birthAndDeathQuery(string $sex): Builder { $query = DB::table('individuals') ->where('i_file', '=', $this->tree->id()) ->join('dates AS birth', static function (JoinClause $join): void { $join ->on('birth.d_file', '=', 'i_file') ...
php
private function birthAndDeathQuery(string $sex): Builder { $query = DB::table('individuals') ->where('i_file', '=', $this->tree->id()) ->join('dates AS birth', static function (JoinClause $join): void { $join ->on('birth.d_file', '=', 'i_file') ...
[ "private", "function", "birthAndDeathQuery", "(", "string", "$", "sex", ")", ":", "Builder", "{", "$", "query", "=", "DB", "::", "table", "(", "'individuals'", ")", "->", "where", "(", "'i_file'", ",", "'='", ",", "$", "this", "->", "tree", "->", "id",...
Query individuals, with their births and deaths. @param string $sex @return Builder
[ "Query", "individuals", "with", "their", "births", "and", "deaths", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Statistics/Repository/IndividualRepository.php#L1874-L1898
train
fisharebest/webtrees
app/Place.php
Place.parent
public function parent(): Place { return new self($this->parts->slice(1)->implode(Gedcom::PLACE_SEPARATOR), $this->tree); }
php
public function parent(): Place { return new self($this->parts->slice(1)->implode(Gedcom::PLACE_SEPARATOR), $this->tree); }
[ "public", "function", "parent", "(", ")", ":", "Place", "{", "return", "new", "self", "(", "$", "this", "->", "parts", "->", "slice", "(", "1", ")", "->", "implode", "(", "Gedcom", "::", "PLACE_SEPARATOR", ")", ",", "$", "this", "->", "tree", ")", ...
Get the higher level place. @return Place
[ "Get", "the", "higher", "level", "place", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Place.php#L64-L67
train
fisharebest/webtrees
app/Place.php
Place.getChildPlaces
public function getChildPlaces(): array { if ($this->place_name !== '') { $parent_text = Gedcom::PLACE_SEPARATOR . $this->place_name; } else { $parent_text = ''; } return DB::table('places') ->where('p_file', '=', $this->tree->id()) ->...
php
public function getChildPlaces(): array { if ($this->place_name !== '') { $parent_text = Gedcom::PLACE_SEPARATOR . $this->place_name; } else { $parent_text = ''; } return DB::table('places') ->where('p_file', '=', $this->tree->id()) ->...
[ "public", "function", "getChildPlaces", "(", ")", ":", "array", "{", "if", "(", "$", "this", "->", "place_name", "!==", "''", ")", "{", "$", "parent_text", "=", "Gedcom", "::", "PLACE_SEPARATOR", ".", "$", "this", "->", "place_name", ";", "}", "else", ...
Get the lower level places. @return Place[]
[ "Get", "the", "lower", "level", "places", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Place.php#L138-L155
train
fisharebest/webtrees
app/Place.php
Place.url
public function url(): string { //find a module providing the place hierarchy $module = app(ModuleService::class) ->findByComponent(ModuleListInterface::class, $this->tree, Auth::user()) ->first(static function (ModuleInterface $module): bool { return $module ...
php
public function url(): string { //find a module providing the place hierarchy $module = app(ModuleService::class) ->findByComponent(ModuleListInterface::class, $this->tree, Auth::user()) ->first(static function (ModuleInterface $module): bool { return $module ...
[ "public", "function", "url", "(", ")", ":", "string", "{", "//find a module providing the place hierarchy", "$", "module", "=", "app", "(", "ModuleService", "::", "class", ")", "->", "findByComponent", "(", "ModuleListInterface", "::", "class", ",", "$", "this", ...
Create a URL to the place-hierarchy page. @return string
[ "Create", "a", "URL", "to", "the", "place", "-", "hierarchy", "page", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Place.php#L162-L180
train
fisharebest/webtrees
app/Place.php
Place.placeName
public function placeName(): string { $place_name = $this->parts->first() ?? I18N::translate('unknown'); return '<span dir="auto">' . e($place_name) . '</span>'; }
php
public function placeName(): string { $place_name = $this->parts->first() ?? I18N::translate('unknown'); return '<span dir="auto">' . e($place_name) . '</span>'; }
[ "public", "function", "placeName", "(", ")", ":", "string", "{", "$", "place_name", "=", "$", "this", "->", "parts", "->", "first", "(", ")", "??", "I18N", "::", "translate", "(", "'unknown'", ")", ";", "return", "'<span dir=\"auto\">'", ".", "e", "(", ...
Format this place for display on screen. @return string
[ "Format", "this", "place", "for", "display", "on", "screen", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Place.php#L197-L202
train
fisharebest/webtrees
app/Place.php
Place.fullName
public function fullName(bool $link = false): string { if ($this->parts->isEmpty()) { return ''; } $full_name = $this->parts->implode(I18N::$list_separator); if ($link) { return '<a dir="auto" href="' . e($this->url()) . '">' . e($full_name) . '</a>'; ...
php
public function fullName(bool $link = false): string { if ($this->parts->isEmpty()) { return ''; } $full_name = $this->parts->implode(I18N::$list_separator); if ($link) { return '<a dir="auto" href="' . e($this->url()) . '">' . e($full_name) . '</a>'; ...
[ "public", "function", "fullName", "(", "bool", "$", "link", "=", "false", ")", ":", "string", "{", "if", "(", "$", "this", "->", "parts", "->", "isEmpty", "(", ")", ")", "{", "return", "''", ";", "}", "$", "full_name", "=", "$", "this", "->", "pa...
Generate the place name for display, including the full hierarchy. @param bool $link @return string
[ "Generate", "the", "place", "name", "for", "display", "including", "the", "full", "hierarchy", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Place.php#L211-L224
train
fisharebest/webtrees
app/Family.php
Family.marriageDateComparator
public static function marriageDateComparator(): Closure { return static function (Family $x, Family $y): int { return Date::compare($x->getMarriageDate(), $y->getMarriageDate()); }; }
php
public static function marriageDateComparator(): Closure { return static function (Family $x, Family $y): int { return Date::compare($x->getMarriageDate(), $y->getMarriageDate()); }; }
[ "public", "static", "function", "marriageDateComparator", "(", ")", ":", "Closure", "{", "return", "static", "function", "(", "Family", "$", "x", ",", "Family", "$", "y", ")", ":", "int", "{", "return", "Date", "::", "compare", "(", "$", "x", "->", "ge...
A closure which will compare families by marriage date. @return Closure
[ "A", "closure", "which", "will", "compare", "families", "by", "marriage", "date", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Family.php#L84-L89
train
fisharebest/webtrees
app/Family.php
Family.spouse
public function spouse(Individual $person, $access_level = null): ?Individual { if ($person === $this->wife) { return $this->husband($access_level); } return $this->wife($access_level); }
php
public function spouse(Individual $person, $access_level = null): ?Individual { if ($person === $this->wife) { return $this->husband($access_level); } return $this->wife($access_level); }
[ "public", "function", "spouse", "(", "Individual", "$", "person", ",", "$", "access_level", "=", "null", ")", ":", "?", "Individual", "{", "if", "(", "$", "person", "===", "$", "this", "->", "wife", ")", "{", "return", "$", "this", "->", "husband", "...
Find the spouse of a person. @param Individual $person @param int|null $access_level @return Individual|null
[ "Find", "the", "spouse", "of", "a", "person", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Family.php#L234-L241
train
fisharebest/webtrees
app/Family.php
Family.numberOfChildren
public function numberOfChildren(): int { $nchi = $this->children()->count(); foreach ($this->facts(['NCHI']) as $fact) { $nchi = max($nchi, (int) $fact->value()); } return $nchi; }
php
public function numberOfChildren(): int { $nchi = $this->children()->count(); foreach ($this->facts(['NCHI']) as $fact) { $nchi = max($nchi, (int) $fact->value()); } return $nchi; }
[ "public", "function", "numberOfChildren", "(", ")", ":", "int", "{", "$", "nchi", "=", "$", "this", "->", "children", "(", ")", "->", "count", "(", ")", ";", "foreach", "(", "$", "this", "->", "facts", "(", "[", "'NCHI'", "]", ")", "as", "$", "fa...
Number of children - for the individual list @return int
[ "Number", "of", "children", "-", "for", "the", "individual", "list" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Family.php#L295-L304
train
fisharebest/webtrees
app/Family.php
Family.getMarriagePlace
public function getMarriagePlace(): Place { $marriage = $this->getMarriage(); if ($marriage instanceof Fact) { return $marriage->place(); } return new Place('', $this->tree); }
php
public function getMarriagePlace(): Place { $marriage = $this->getMarriage(); if ($marriage instanceof Fact) { return $marriage->place(); } return new Place('', $this->tree); }
[ "public", "function", "getMarriagePlace", "(", ")", ":", "Place", "{", "$", "marriage", "=", "$", "this", "->", "getMarriage", "(", ")", ";", "if", "(", "$", "marriage", "instanceof", "Fact", ")", "{", "return", "$", "marriage", "->", "place", "(", ")"...
Get the marriage place @return Place
[ "Get", "the", "marriage", "place" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Family.php#L346-L355
train
fisharebest/webtrees
app/Family.php
Family.getAllMarriagePlaces
public function getAllMarriagePlaces(): array { foreach (Gedcom::MARRIAGE_EVENTS as $event) { $places = $this->getAllEventPlaces([$event]); if (!empty($places)) { return $places; } } return []; }
php
public function getAllMarriagePlaces(): array { foreach (Gedcom::MARRIAGE_EVENTS as $event) { $places = $this->getAllEventPlaces([$event]); if (!empty($places)) { return $places; } } return []; }
[ "public", "function", "getAllMarriagePlaces", "(", ")", ":", "array", "{", "foreach", "(", "Gedcom", "::", "MARRIAGE_EVENTS", "as", "$", "event", ")", "{", "$", "places", "=", "$", "this", "->", "getAllEventPlaces", "(", "[", "$", "event", "]", ")", ";",...
Get a list of all marriage places - for the family lists. @return Place[]
[ "Get", "a", "list", "of", "all", "marriage", "places", "-", "for", "the", "family", "lists", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Family.php#L380-L390
train
fisharebest/webtrees
app/Http/Controllers/Auth/VerifyEmailController.php
VerifyEmailController.verify
public function verify(ServerRequestInterface $request, Tree $tree, UserService $user_service): ResponseInterface { $username = $request->get('username', ''); $token = $request->get('token', ''); $title = I18N::translate('User verification'); $user = $user_service->findByUserNam...
php
public function verify(ServerRequestInterface $request, Tree $tree, UserService $user_service): ResponseInterface { $username = $request->get('username', ''); $token = $request->get('token', ''); $title = I18N::translate('User verification'); $user = $user_service->findByUserNam...
[ "public", "function", "verify", "(", "ServerRequestInterface", "$", "request", ",", "Tree", "$", "tree", ",", "UserService", "$", "user_service", ")", ":", "ResponseInterface", "{", "$", "username", "=", "$", "request", "->", "get", "(", "'username'", ",", "...
Respond to a verification link that was emailed to a user. @param ServerRequestInterface $request @param Tree $tree @param UserService $user_service @return ResponseInterface
[ "Respond", "to", "a", "verification", "link", "that", "was", "emailed", "to", "a", "user", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Auth/VerifyEmailController.php#L46-L103
train
fisharebest/webtrees
app/Http/Controllers/Admin/ImportThumbnailsController.php
ImportThumbnailsController.findMediaObjectsForMediaFile
private function findMediaObjectsForMediaFile(string $file): array { return DB::table('media') ->join('media_file', static function (JoinClause $join): void { $join ->on('media_file.m_file', '=', 'media.m_file') ->on('media_file.m_id', '=',...
php
private function findMediaObjectsForMediaFile(string $file): array { return DB::table('media') ->join('media_file', static function (JoinClause $join): void { $join ->on('media_file.m_file', '=', 'media.m_file') ->on('media_file.m_id', '=',...
[ "private", "function", "findMediaObjectsForMediaFile", "(", "string", "$", "file", ")", ":", "array", "{", "return", "DB", "::", "table", "(", "'media'", ")", "->", "join", "(", "'media_file'", ",", "static", "function", "(", "JoinClause", "$", "join", ")", ...
Find the media object that uses a particular media file. @param string $file @return Media[]
[ "Find", "the", "media", "object", "that", "uses", "a", "particular", "media", "file", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Admin/ImportThumbnailsController.php#L232-L247
train
fisharebest/webtrees
app/Http/Controllers/Admin/ImportThumbnailsController.php
ImportThumbnailsController.scaledImagePixels
private function scaledImagePixels($path): array { $size = 10; $sha1 = sha1_file($path); $cache_file = WT_DATA_DIR . 'cache/' . $sha1 . '.php'; if (file_exists($cache_file)) { return include $cache_file; } $manager = new ImageManager(); ...
php
private function scaledImagePixels($path): array { $size = 10; $sha1 = sha1_file($path); $cache_file = WT_DATA_DIR . 'cache/' . $sha1 . '.php'; if (file_exists($cache_file)) { return include $cache_file; } $manager = new ImageManager(); ...
[ "private", "function", "scaledImagePixels", "(", "$", "path", ")", ":", "array", "{", "$", "size", "=", "10", ";", "$", "sha1", "=", "sha1_file", "(", "$", "path", ")", ";", "$", "cache_file", "=", "WT_DATA_DIR", ".", "'cache/'", ".", "$", "sha1", "....
Scale an image to 10x10 and read the individual pixels. This is a slow operation, add we will do it many times on the "import wetbrees 1 thumbnails" page so cache the results. @param string $path @return int[][]
[ "Scale", "an", "image", "to", "10x10", "and", "read", "the", "individual", "pixels", ".", "This", "is", "a", "slow", "operation", "add", "we", "will", "do", "it", "many", "times", "on", "the", "import", "wetbrees", "1", "thumbnails", "page", "so", "cache...
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/Admin/ImportThumbnailsController.php#L304-L329
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.header
public function header() { foreach ($this->headerElements as $element) { if ($element instanceof ReportBaseElement) { $element->render($this); } elseif ($element === 'footnotetexts') { $this->footnotes(); } elseif ($element === 'addpage') {...
php
public function header() { foreach ($this->headerElements as $element) { if ($element instanceof ReportBaseElement) { $element->render($this); } elseif ($element === 'footnotetexts') { $this->footnotes(); } elseif ($element === 'addpage') {...
[ "public", "function", "header", "(", ")", "{", "foreach", "(", "$", "this", "->", "headerElements", "as", "$", "element", ")", "{", "if", "(", "$", "element", "instanceof", "ReportBaseElement", ")", "{", "$", "element", "->", "render", "(", "$", "this", ...
PDF Header -PDF @return void
[ "PDF", "Header", "-", "PDF" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L64-L85
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.body
public function body() { $this->AddPage(); foreach ($this->bodyElements as $key => $element) { if ($element instanceof ReportBaseElement) { $element->render($this); } elseif ($element === 'footnotetexts') { $this->footnotes(); } el...
php
public function body() { $this->AddPage(); foreach ($this->bodyElements as $key => $element) { if ($element instanceof ReportBaseElement) { $element->render($this); } elseif ($element === 'footnotetexts') { $this->footnotes(); } el...
[ "public", "function", "body", "(", ")", "{", "$", "this", "->", "AddPage", "(", ")", ";", "foreach", "(", "$", "this", "->", "bodyElements", "as", "$", "key", "=>", "$", "element", ")", "{", "if", "(", "$", "element", "instanceof", "ReportBaseElement",...
PDF Body -PDF @return void
[ "PDF", "Body", "-", "PDF" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L92-L105
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.footnotes
public function footnotes() { foreach ($this->printedfootnotes as $element) { if (($this->GetY() + $element->getFootnoteHeight($this)) > $this->getPageHeight()) { $this->AddPage(); } $element->renderFootnote($this); if ($this->GetY() > $this-...
php
public function footnotes() { foreach ($this->printedfootnotes as $element) { if (($this->GetY() + $element->getFootnoteHeight($this)) > $this->getPageHeight()) { $this->AddPage(); } $element->renderFootnote($this); if ($this->GetY() > $this-...
[ "public", "function", "footnotes", "(", ")", "{", "foreach", "(", "$", "this", "->", "printedfootnotes", "as", "$", "element", ")", "{", "if", "(", "(", "$", "this", "->", "GetY", "(", ")", "+", "$", "element", "->", "getFootnoteHeight", "(", "$", "t...
PDF Footnotes -PDF @return void
[ "PDF", "Footnotes", "-", "PDF" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L112-L125
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.footer
public function footer() { foreach ($this->footerElements as $element) { if ($element instanceof ReportBaseElement) { $element->render($this); } elseif ($element === 'footnotetexts') { $this->footnotes(); } elseif ($element === 'addpage') {...
php
public function footer() { foreach ($this->footerElements as $element) { if ($element instanceof ReportBaseElement) { $element->render($this); } elseif ($element === 'footnotetexts') { $this->footnotes(); } elseif ($element === 'addpage') {...
[ "public", "function", "footer", "(", ")", "{", "foreach", "(", "$", "this", "->", "footerElements", "as", "$", "element", ")", "{", "if", "(", "$", "element", "instanceof", "ReportBaseElement", ")", "{", "$", "element", "->", "render", "(", "$", "this", ...
PDF Footer -PDF @return void
[ "PDF", "Footer", "-", "PDF" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L132-L143
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.setCurrentStyle
public function setCurrentStyle(string $s) { $this->currentStyle = $s; $style = $this->wt_report->getStyle($s); $this->SetFont($style['font'], $style['style'], $style['size']); }
php
public function setCurrentStyle(string $s) { $this->currentStyle = $s; $style = $this->wt_report->getStyle($s); $this->SetFont($style['font'], $style['style'], $style['size']); }
[ "public", "function", "setCurrentStyle", "(", "string", "$", "s", ")", "{", "$", "this", "->", "currentStyle", "=", "$", "s", ";", "$", "style", "=", "$", "this", "->", "wt_report", "->", "getStyle", "(", "$", "s", ")", ";", "$", "this", "->", "Set...
Setup a style for usage -PDF @param string $s Style name @return void
[ "Setup", "a", "style", "for", "usage", "-", "PDF" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L292-L297
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.getStyle
public function getStyle(string $s): array { if (!isset($this->wt_report->styles[$s])) { $s = $this->getCurrentStyle(); $this->wt_report->styles[$s] = $s; } return $this->wt_report->styles[$s]; }
php
public function getStyle(string $s): array { if (!isset($this->wt_report->styles[$s])) { $s = $this->getCurrentStyle(); $this->wt_report->styles[$s] = $s; } return $this->wt_report->styles[$s]; }
[ "public", "function", "getStyle", "(", "string", "$", "s", ")", ":", "array", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "wt_report", "->", "styles", "[", "$", "s", "]", ")", ")", "{", "$", "s", "=", "$", "this", "->", "getCurrentStyle...
Get the style -PDF @param string $s Style name @return array
[ "Get", "the", "style", "-", "PDF" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L306-L314
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.addMarginX
public function addMarginX(float $x): float { $m = $this->getMargins(); if ($this->getRTL()) { $x += $m['right']; } else { $x += $m['left']; } $this->SetX($x); return $x; }
php
public function addMarginX(float $x): float { $m = $this->getMargins(); if ($this->getRTL()) { $x += $m['right']; } else { $x += $m['left']; } $this->SetX($x); return $x; }
[ "public", "function", "addMarginX", "(", "float", "$", "x", ")", ":", "float", "{", "$", "m", "=", "$", "this", "->", "getMargins", "(", ")", ";", "if", "(", "$", "this", "->", "getRTL", "(", ")", ")", "{", "$", "x", "+=", "$", "m", "[", "'ri...
Add margin when static horizontal position is used -PDF RTL supported @param float $x Static position @return float
[ "Add", "margin", "when", "static", "horizontal", "position", "is", "used", "-", "PDF", "RTL", "supported" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L324-L335
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.getMaxLineWidth
public function getMaxLineWidth() { $m = $this->getMargins(); if ($this->getRTL()) { return ($this->getRemainingWidth() + $m['right']); } return ($this->getRemainingWidth() + $m['left']); }
php
public function getMaxLineWidth() { $m = $this->getMargins(); if ($this->getRTL()) { return ($this->getRemainingWidth() + $m['right']); } return ($this->getRemainingWidth() + $m['left']); }
[ "public", "function", "getMaxLineWidth", "(", ")", "{", "$", "m", "=", "$", "this", "->", "getMargins", "(", ")", ";", "if", "(", "$", "this", "->", "getRTL", "(", ")", ")", "{", "return", "(", "$", "this", "->", "getRemainingWidth", "(", ")", "+",...
Get the maximum line width to draw from the curren position -PDF RTL supported @return float
[ "Get", "the", "maximum", "line", "width", "to", "draw", "from", "the", "curren", "position", "-", "PDF", "RTL", "supported" ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L343-L351
train
fisharebest/webtrees
app/Report/ReportTcpdf.php
ReportTcpdf.getFootnotesHeight
public function getFootnotesHeight(): float { $h = 0; foreach ($this->printedfootnotes as $element) { $h += $element->getHeight($this); } return $h; }
php
public function getFootnotesHeight(): float { $h = 0; foreach ($this->printedfootnotes as $element) { $h += $element->getHeight($this); } return $h; }
[ "public", "function", "getFootnotesHeight", "(", ")", ":", "float", "{", "$", "h", "=", "0", ";", "foreach", "(", "$", "this", "->", "printedfootnotes", "as", "$", "element", ")", "{", "$", "h", "+=", "$", "element", "->", "getHeight", "(", "$", "thi...
Get the height of the footnote. @return float
[ "Get", "the", "height", "of", "the", "footnote", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Report/ReportTcpdf.php#L358-L366
train
fisharebest/webtrees
app/Date/JulianDate.php
JulianDate.formatLongYear
protected function formatLongYear(): string { if ($this->year < 0) { return /* I18N: BCE=Before the Common Era, for Julian years < 0. See http://en.wikipedia.org/wiki/Common_Era */ I18N::translate('%s&nbsp;BCE', I18N::digits(-$this->year)); } if ($this->new_old_...
php
protected function formatLongYear(): string { if ($this->year < 0) { return /* I18N: BCE=Before the Common Era, for Julian years < 0. See http://en.wikipedia.org/wiki/Common_Era */ I18N::translate('%s&nbsp;BCE', I18N::digits(-$this->year)); } if ($this->new_old_...
[ "protected", "function", "formatLongYear", "(", ")", ":", "string", "{", "if", "(", "$", "this", "->", "year", "<", "0", ")", "{", "return", "/* I18N: BCE=Before the Common Era, for Julian years < 0. See http://en.wikipedia.org/wiki/Common_Era */", "I18N", "::", "transla...
Generate the %Y format for a date. @return string
[ "Generate", "the", "%Y", "format", "for", "a", "date", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Date/JulianDate.php#L92-L105
train
fisharebest/webtrees
app/Date/JulianDate.php
JulianDate.formatGedcomYear
protected function formatGedcomYear(): string { if ($this->year < 0) { return sprintf('%04d B.C.', -$this->year); } if ($this->new_old_style) { return sprintf('%04d/%02d', $this->year - 1, $this->year % 100); } return sprintf('%04d', $this->year); ...
php
protected function formatGedcomYear(): string { if ($this->year < 0) { return sprintf('%04d B.C.', -$this->year); } if ($this->new_old_style) { return sprintf('%04d/%02d', $this->year - 1, $this->year % 100); } return sprintf('%04d', $this->year); ...
[ "protected", "function", "formatGedcomYear", "(", ")", ":", "string", "{", "if", "(", "$", "this", "->", "year", "<", "0", ")", "{", "return", "sprintf", "(", "'%04d B.C.'", ",", "-", "$", "this", "->", "year", ")", ";", "}", "if", "(", "$", "this"...
Generate the %E format for a date. @return string
[ "Generate", "the", "%E", "format", "for", "a", "date", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Date/JulianDate.php#L112-L123
train
fisharebest/webtrees
app/Http/Controllers/AutocompleteController.php
AutocompleteController.folder
public function folder(ServerRequestInterface $request, Tree $tree, Filesystem $filesystem): ResponseInterface { $query = $request->get('query', ''); $prefix = $tree->getPreference('MEDIA_DIRECTORY', ''); $media_filesystem = new Filesystem(new ChrootAdapter($filesystem, $prefix)); ...
php
public function folder(ServerRequestInterface $request, Tree $tree, Filesystem $filesystem): ResponseInterface { $query = $request->get('query', ''); $prefix = $tree->getPreference('MEDIA_DIRECTORY', ''); $media_filesystem = new Filesystem(new ChrootAdapter($filesystem, $prefix)); ...
[ "public", "function", "folder", "(", "ServerRequestInterface", "$", "request", ",", "Tree", "$", "tree", ",", "Filesystem", "$", "filesystem", ")", ":", "ResponseInterface", "{", "$", "query", "=", "$", "request", "->", "get", "(", "'query'", ",", "''", ")...
Autocomplete for media folders. @param ServerRequestInterface $request @param Tree $tree @param Filesystem $filesystem @return ResponseInterface
[ "Autocomplete", "for", "media", "folders", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/AutocompleteController.php#L69-L88
train
fisharebest/webtrees
app/Http/Controllers/AutocompleteController.php
AutocompleteController.page
public function page(ServerRequestInterface $request, Tree $tree): ResponseInterface { $query = $request->get('query', ''); $xref = $request->get('extra', ''); $source = Source::getInstance($xref, $tree); Auth::checkSourceAccess($source); $regex_query = preg_quote(strtr($...
php
public function page(ServerRequestInterface $request, Tree $tree): ResponseInterface { $query = $request->get('query', ''); $xref = $request->get('extra', ''); $source = Source::getInstance($xref, $tree); Auth::checkSourceAccess($source); $regex_query = preg_quote(strtr($...
[ "public", "function", "page", "(", "ServerRequestInterface", "$", "request", ",", "Tree", "$", "tree", ")", ":", "ResponseInterface", "{", "$", "query", "=", "$", "request", "->", "get", "(", "'query'", ",", "''", ")", ";", "$", "xref", "=", "$", "requ...
Autocomplete for source citations. @param ServerRequestInterface $request @param Tree $tree @return ResponseInterface
[ "Autocomplete", "for", "source", "citations", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/AutocompleteController.php#L98-L160
train
fisharebest/webtrees
app/Http/Controllers/AutocompleteController.php
AutocompleteController.placeSearch
private function placeSearch(Tree $tree, int $page, string $query, bool $create): array { $offset = $page * self::RESULTS_PER_PAGE; $results = []; $found = false; foreach ($this->search_service->searchPlaces($tree, $query) as $place) { $place_name = $place->gedcomName...
php
private function placeSearch(Tree $tree, int $page, string $query, bool $create): array { $offset = $page * self::RESULTS_PER_PAGE; $results = []; $found = false; foreach ($this->search_service->searchPlaces($tree, $query) as $place) { $place_name = $place->gedcomName...
[ "private", "function", "placeSearch", "(", "Tree", "$", "tree", ",", "int", "$", "page", ",", "string", "$", "query", ",", "bool", "$", "create", ")", ":", "array", "{", "$", "offset", "=", "$", "page", "*", "self", "::", "RESULTS_PER_PAGE", ";", "$"...
Look up a place name. @param Tree $tree Search this tree. @param int $page Skip this number of pages. Starts with zero. @param string $query Search terms. @param bool $create if true, include the query in the results so it can be created. @return mixed[]
[ "Look", "up", "a", "place", "name", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Http/Controllers/AutocompleteController.php#L370-L444
train
fisharebest/webtrees
app/Module/IndividualMetadataModule.php
IndividualMetadataModule.getSidebarContent
public function getSidebarContent(Individual $individual): string { ob_start(); foreach ($individual->facts(static::HANDLED_FACTS) as $fact) { FunctionsPrintFacts::printFact($fact, $individual); } $html = ob_get_clean(); return strip_tags($html, '<a><div><span>...
php
public function getSidebarContent(Individual $individual): string { ob_start(); foreach ($individual->facts(static::HANDLED_FACTS) as $fact) { FunctionsPrintFacts::printFact($fact, $individual); } $html = ob_get_clean(); return strip_tags($html, '<a><div><span>...
[ "public", "function", "getSidebarContent", "(", "Individual", "$", "individual", ")", ":", "string", "{", "ob_start", "(", ")", ";", "foreach", "(", "$", "individual", "->", "facts", "(", "static", "::", "HANDLED_FACTS", ")", "as", "$", "fact", ")", "{", ...
Load this sidebar synchronously. @param Individual $individual @return string
[ "Load", "this", "sidebar", "synchronously", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/IndividualMetadataModule.php#L91-L102
train
fisharebest/webtrees
app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php
BatchUpdateMarriedNamesPlugin.surnamesToAdd
private function surnamesToAdd(GedcomRecord $record): array { $gedcom = $record->gedcom(); $tree = $record->tree(); $wife_surnames = $this->surnames($record); $husb_surnames = []; $missing_surnames = []; preg_match_all('/^1 FAMS @(.+)@/m', $gedcom, $fmatch);...
php
private function surnamesToAdd(GedcomRecord $record): array { $gedcom = $record->gedcom(); $tree = $record->tree(); $wife_surnames = $this->surnames($record); $husb_surnames = []; $missing_surnames = []; preg_match_all('/^1 FAMS @(.+)@/m', $gedcom, $fmatch);...
[ "private", "function", "surnamesToAdd", "(", "GedcomRecord", "$", "record", ")", ":", "array", "{", "$", "gedcom", "=", "$", "record", "->", "gedcom", "(", ")", ";", "$", "tree", "=", "$", "record", "->", "tree", "(", ")", ";", "$", "wife_surnames", ...
Generate a list of married surnames that are not already present. @param GedcomRecord $record @return string[]
[ "Generate", "a", "list", "of", "married", "surnames", "that", "are", "not", "already", "present", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php#L119-L150
train
fisharebest/webtrees
app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php
BatchUpdateMarriedNamesPlugin.surnames
private function surnames(GedcomRecord $record): array { $gedcom = $record->gedcom(); if (preg_match_all('/^(?:1 NAME|2 _MARNM) .*\/(.+)\//m', $gedcom, $match)) { return $match[1]; } return []; }
php
private function surnames(GedcomRecord $record): array { $gedcom = $record->gedcom(); if (preg_match_all('/^(?:1 NAME|2 _MARNM) .*\/(.+)\//m', $gedcom, $match)) { return $match[1]; } return []; }
[ "private", "function", "surnames", "(", "GedcomRecord", "$", "record", ")", ":", "array", "{", "$", "gedcom", "=", "$", "record", "->", "gedcom", "(", ")", ";", "if", "(", "preg_match_all", "(", "'/^(?:1 NAME|2 _MARNM) .*\\/(.+)\\//m'", ",", "$", "gedcom", "...
Extract a list of surnames from a GEDCOM record. @param GedcomRecord $record @return string[]
[ "Extract", "a", "list", "of", "surnames", "from", "a", "GEDCOM", "record", "." ]
840bd0d721dc479520ec24a065996bc6becb8348
https://github.com/fisharebest/webtrees/blob/840bd0d721dc479520ec24a065996bc6becb8348/app/Module/BatchUpdate/BatchUpdateMarriedNamesPlugin.php#L159-L168
train