1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
metarobots.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Hook\Page;
3
4
use \Bitrix\Landing\Field;
5
use \Bitrix\Main\Localization\Loc;
6
7
Loc::loadMessages(__FILE__);
8
9
class
MetaRobots
extends
\Bitrix\Landing\Hook\Page
10
{
15
protected
function
getMap
()
16
{
17
return
array
(
18
'INDEX'
=>
new
Field
\
Checkbox
(
'INDEX'
,
array
(
19
'title'
=> Loc::getMessage(
'LANDING_HOOK_MRINDEX'
)
20
))
21
);
22
}
23
28
public
function
getTitle
()
29
{
30
return
Loc::getMessage(
'LANDING_HOOK_MR_NAME'
);
31
}
32
37
public
function
enabled
()
38
{
39
return
true
;
//always
40
}
41
46
public
function
enabledInEditMode
()
47
{
48
return
false
;
49
}
50
55
public
function
exec
()
56
{
57
if
($this->
execCustom
())
58
{
59
return
;
60
}
61
62
if
(\
Bitrix
\
Landing
\Landing::getPreviewMode())
63
{
64
$use =
'N'
;
65
}
66
else
67
{
68
$use = $this->fields[
'INDEX'
]->getValue();
69
}
70
\Bitrix\Main\Page\Asset::getInstance()->addString(
71
'<meta name="robots" content="'
. ($use !=
'N'
?
'all'
:
'noindex'
) .
'" />'
72
);
73
}
74
}
Bitrix\Landing\Field\Checkbox
Определения
checkbox.php:5
Bitrix\Landing\Hook\Page\MetaRobots
Определения
metarobots.php:10
Bitrix\Landing\Hook\Page\MetaRobots\getMap
getMap()
Определения
metarobots.php:15
Bitrix\Landing\Hook\Page\MetaRobots\getTitle
getTitle()
Определения
metarobots.php:28
Bitrix\Landing\Hook\Page\MetaRobots\enabledInEditMode
enabledInEditMode()
Определения
metarobots.php:46
Bitrix\Landing\Hook\Page\MetaRobots\enabled
enabled()
Определения
metarobots.php:37
Bitrix\Landing\Hook\Page\MetaRobots\exec
exec()
Определения
metarobots.php:55
Bitrix\Landing\Hook\Page\execCustom
execCustom()
Определения
page.php:262
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
Bitrix\Landing\Field
Определения
checkbox.php:2
Bitrix\Landing\Hook\Page
Определения
b24button.php:2
Bitrix\Landing
Определения
agent.php:3
Bitrix
bitrix
modules
landing
lib
hook
page
metarobots.php
Создано системой
1.14.0