/webtrees/app/Elements/ |
H A D | AbstractElement.php | 94 public function canonical(string $value): string function in Fisharebest\\Webtrees\\Elements\\AbstractElement 156 $value = $this->canonical($value); 310 $canonical = $this->canonical($value); 312 return $values[$canonical] ?? '<bdi>' . e($value) . '</bdi>'; 334 $canonical = $this->canonical($value); 336 if (str_contains($canonical, 'http://') || str_contains($canonical, 'https://')) { 337 $html = Registry::markdownFactory()->autolink($canonical); 340 $html = nl2br(e($canonical), false); 360 $canonical = $this->canonical($value); 366 return Registry::markdownFactory()->markdown($canonical, $tree); [all …]
|
H A D | AgeAtEvent.php | 63 public function canonical(string $value): string function in Fisharebest\\Webtrees\\Elements\\AgeAtEvent 66 $canonical = parent::canonical($value); 67 $upper = strtoupper($canonical); 73 return strtolower($canonical); 86 $canonical = $this->canonical($value); 88 switch ($canonical) { 104 ], e($canonical));
|
H A D | PhoneNumber.php | 45 $canonical = $this->canonical($value); 47 if (preg_match('/^[+0-9-]+$/', $canonical)) { 48 return '<a dir="ltr" href="tel:' . e($canonical) . '">' . e($canonical) . '</a>';
|
H A D | AddressEmail.php | 44 $canonical = $this->canonical($value); 46 return '<a dir="ltr" href="mailto:' . e($canonical) . '">' . e($canonical) . '</a>';
|
H A D | AbstractExternalLink.php | 43 $canonical = $this->canonical($value); 44 $url = strtr(static::EXTERNAL_URL, ['{ID}' => rawurlencode($canonical)]); 46 return '<a dir="ltr" href="' . e($url) . '" rel="nofollow">' . e($canonical) . '</a>';
|
H A D | MarriageType.php | 40 public function canonical(string $value): string function in Fisharebest\\Webtrees\\Elements\\MarriageType 42 $value = strtoupper(parent::canonical($value)); 44 $canonical = [ 48 return $canonical[$value] ?? $value;
|
H A D | VersionNumber.php | 44 $canonical = $this->canonical($value); 46 return '<span dir="ltr">' . e($canonical) . '</span>';
|
/webtrees/tests/app/Elements/ |
H A D | MultimediaFormatTest.php | 40 self::assertSame('JPG', self::$element->canonical('jpg')); 41 self::assertSame('JPG', self::$element->canonical('jpeg')); 42 self::assertSame('JPG', self::$element->canonical('JPG')); 43 self::assertSame('JPG', self::$element->canonical('JPEG')); 44 self::assertSame('TIF', self::$element->canonical('tif')); 45 self::assertSame('TIF', self::$element->canonical('tiff')); 46 self::assertSame('TIF', self::$element->canonical('TIF')); 47 self::assertSame('TIF', self::$element->canonical('TIFF')); 48 self::assertSame('PDF', self::$element->canonical('pdf'));
|
H A D | MaidenheadLocatorTest.php | 40 self::assertSame('AB', self::$element->canonical('ab')); 41 self::assertSame('AB', self::$element->canonical('AB')); 42 self::assertSame('AB12', self::$element->canonical('ab12')); 43 self::assertSame('AB12', self::$element->canonical('AB12')); 44 self::assertSame('AB12cd', self::$element->canonical('ab12cd')); 45 self::assertSame('AB12cd', self::$element->canonical('AB12CD')); 46 self::assertSame('AB12cd34', self::$element->canonical('ab12cd34')); 47 self::assertSame('AB12cd34', self::$element->canonical('AB12CD34'));
|
H A D | RestrictionNoticeTest.php | 40 self::assertSame('PRIVACY', self::$element->canonical('pRiVacy')); 41 self::assertSame('NONE', self::$element->canonical('NONE')); 42 self::assertSame('CONFIDENTIAL', self::$element->canonical('Confidential')); 43 self::assertSame('LOCKED', self::$element->canonical(', locked ,')); 44 self::assertSame('CONFIDENTIAL, LOCKED', self::$element->canonical('locked confidential')); 45 self::assertSame('PRIVACY, LOCKED', self::$element->canonical('locked, privacy')); 46 self::assertSame('NONE, LOCKED', self::$element->canonical('locked,, none'));
|
H A D | AgeAtEventTest.php | 41 self::assertSame('CHILD', self::$element->canonical('cHiLd')); 42 self::assertSame('INFANT', self::$element->canonical('iNfAnT ')); 43 self::assertSame('STILLBORN', self::$element->canonical(' sTiLlBoRn')); 44 self::assertSame('fish', self::$element->canonical('fIsH')); 45 self::assertSame('1y 2m 3d', self::$element->canonical('1Y 2M 3D'));
|
H A D | LanguageIdTest.php | 40 self::assertSame('ENGLISH', self::$element->canonical("\t English\t ")); 41 self::assertSame('KLINGON', self::$element->canonical('kLiNgOn')); 42 self::assertSame('ANGLO-SAXON', self::$element->canonical('anglo-saxon')); 43 self::assertSame('CATALAN_SPN', self::$element->canonical('CATALAN_SPN'));
|
H A D | RoleInEventTest.php | 40 self::assertSame('CHIL', self::$element->canonical('cHiL')); 41 self::assertSame('(Foo bAr baZ)', self::$element->canonical('Foo bAr baZ')); 42 self::assertSame('(Foo bAr baZ)', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 43 self::assertSame('(Foo bAr baZ)', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
H A D | PlaceHierarchyTest.php | 40 self::assertSame('Foo, bAr, baZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame('Foo, bAr, baZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 self::assertSame('Foo, bAr, baZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r")); 43 self::assertSame('Foo, Bar, Baz', self::$element->canonical(',,Foo,Bar , , Baz, '));
|
H A D | SourceMediaTypeTest.php | 40 self::assertSame('FOO BAR BAZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
H A D | MultimediaFileReferenceTest.php | 40 self::assertSame('Foo bAr baZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 self::assertSame('Foo bAr baZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
H A D | SubmitterTextTest.php | 40 self::assertSame('Foo bAr baZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 … self::assertSame("Foo \n\n bAr \n baZ", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
H A D | ContentDescriptionTest.php | 40 self::assertSame('Foo bAr baZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 … self::assertSame("Foo \n\n bAr \n baZ", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
H A D | DescriptiveTitleTest.php | 40 self::assertSame('Foo bAr baZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame(' Foo bAr baZ ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 … self::assertSame("Foo \n\n bAr \n baZ", self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
H A D | CharacterSetTest.php | 40 self::assertSame('FOO BAR BAZ', self::$element->canonical('Foo bAr baZ')); 41 self::assertSame('FOO BAR BAZ', self::$element->canonical("\t Foo\t bAr \tbaZ\t ")); 42 self::assertSame('FOO BAR BAZ', self::$element->canonical("\nFoo \n\r bAr \r\n baZ\r"));
|
/webtrees/app/Http/RequestHandlers/ |
H A D | CreateSourceAction.php | 51 $title = Registry::elementFactory()->make('SOUR:TITL')->canonical($title); 52 $abbreviation = Registry::elementFactory()->make('SOUR:ABBR')->canonical($abbreviation); 53 $author = Registry::elementFactory()->make('SOUR:AUTH')->canonical($author); 54 $publication = Registry::elementFactory()->make('SOUR:PUBL')->canonical($publication); 55 $repository = Registry::elementFactory()->make('SOUR:REPO')->canonical($repository); 56 $call_number = Registry::elementFactory()->make('SOUR:REPO:CALN')->canonical($call_number); 57 $text = Registry::elementFactory()->make('SOUR:TEXT')->canonical($text); 58 $restriction = Registry::elementFactory()->make('SOUR:RESN')->canonical($restriction);
|
H A D | CreateSubmitterAction.php | 48 $name = Registry::elementFactory()->make('SUBM:NAME')->canonical($name); 49 $address = Registry::elementFactory()->make('SUBM:ADDR')->canonical($address); 50 $email = Registry::elementFactory()->make('SUBM:EMAIL')->canonical($email); 51 $phone = Registry::elementFactory()->make('SUBM:PHON')->canonical($phone); 52 $restriction = Registry::elementFactory()->make('SUBM:RESN')->canonical($restriction);
|
H A D | CreateRepositoryAction.php | 50 $name = Registry::elementFactory()->make('REPO:NAME')->canonical($name); 51 $address = Registry::elementFactory()->make('REPO:ADDR')->canonical($address); 52 $url = Registry::elementFactory()->make('REPO:WWW')->canonical($url); 53 $restriction = Registry::elementFactory()->make('REPO:RESN')->canonical($restriction);
|
H A D | CreateMediaObjectFromFile.php | 62 $file = Registry::elementFactory()->make('OBJE:FILE')->canonical($file); 63 $note = Registry::elementFactory()->make('OBJE:NOTE')->canonical($note); 64 $type = Registry::elementFactory()->make('OBJE:FILE:FORM:TYPE')->canonical($type); 65 $title = Registry::elementFactory()->make('OBJE:FILE:TITL')->canonical($title);
|
H A D | CreateMediaObjectAction.php | 70 $note = Registry::elementFactory()->make('OBJE:NOTE')->canonical($note); 71 $type = Registry::elementFactory()->make('OBJE:FILE:FORM:TYPE')->canonical($type); 72 $title = Registry::elementFactory()->make('OBJE:FILE:TITL')->canonical($title); 73 $restriction = Registry::elementFactory()->make('OBJE:RESN')->canonical($restriction);
|