Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
applemaps.php
1
<?php
2
namespace
Bitrix\Main\UrlPreview\Parser
;
3
4
use
Bitrix\Main\Localization\Loc
,
5
Bitrix\Main\UrlPreview\Parser
,
6
Bitrix\Main\UrlPreview\HtmlDocument
;
7
12
class
AppleMaps
extends
Parser
13
{
20
public
function
handle
(
HtmlDocument
$document): void
21
{
22
parse_str($document->
getUri
()->getQuery(), $outputParams);
23
24
$document->
setTitle
(
Loc::getMessage
(
'MAIN_URL_PREVIEW_PARSER_APPLE_MAPS_TITLE'
));
25
26
$description =
''
;
27
if
(!empty($outputParams[
'q'
]))
28
{
29
$description .= $outputParams[
'q'
];
30
}
31
if
(!empty($outputParams[
'address'
]))
32
{
33
if
(!empty($description))
34
{
35
$description .=
' '
;
36
}
37
$description .= $outputParams[
'address'
];
38
}
39
40
$document->
setDescription
($description);
41
}
42
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Main\PhoneNumber\Parser
Definition
parser.php:10
Bitrix\Main\UrlPreview\HtmlDocument
Definition
htmldocument.php:13
Bitrix\Main\UrlPreview\HtmlDocument\getUri
getUri()
Definition
htmldocument.php:61
Bitrix\Main\UrlPreview\HtmlDocument\setDescription
setDescription($description)
Definition
htmldocument.php:144
Bitrix\Main\UrlPreview\HtmlDocument\setTitle
setTitle($title)
Definition
htmldocument.php:122
Bitrix\Main\UrlPreview\Parser\AppleMaps
Definition
applemaps.php:13
Bitrix\Main\UrlPreview\Parser\AppleMaps\handle
handle(HtmlDocument $document)
Definition
applemaps.php:20
Bitrix\Main\UrlPreview\Parser
Definition
applemaps.php:2
modules
main
lib
urlpreview
parser
applemaps.php
Создано системой
1.10.0