Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
robots.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
Robots
extends
\Bitrix\Landing\Hook\Page
10
{
15
protected
function
getMap
()
16
{
17
return
array(
18
'USE'
=>
new
Field
\
Checkbox
(
'USE'
, array(
19
'title'
=>
Loc::getMessage
(
'LANDING_HOOK_ROBOTS_USE'
)
20
)),
21
'CONTENT'
=>
new
Field
\
Textarea
(
'CONTENT'
, array(
22
'title'
=>
Loc::getMessage
(
'LANDING_HOOK_ROBOTS_CONTENT'
),
23
'placeholder'
=>
'User-agent: Google
24
Allow: /folder1/
25
Disallow: /file1.html
26
Host: www.site.com
27
28
User-agent: *
29
Disallow: /document.php'
30
))
31
);
32
}
33
38
public
function
getTitle
()
39
{
40
return
Loc::getMessage
(
'LANDING_HOOK_ROBOTS_NAME'
);
41
}
42
47
public
function
enabledInEditMode
()
48
{
49
return
false
;
50
}
51
56
public
function
enabled
()
57
{
58
return
$this->fields[
'USE'
]->getValue() ==
'Y'
;
59
}
60
65
public
function
exec
()
66
{
67
return
$this->fields[
'CONTENT'
]->getValue();
68
}
69
}
Bitrix\Landing\Field\Checkbox
Definition
checkbox.php:5
Bitrix\Landing\Field\Textarea
Definition
textarea.php:5
Bitrix\Landing\Field
Definition
field.php:5
Bitrix\Landing\Hook\Page\Robots
Definition
robots.php:10
Bitrix\Landing\Hook\Page\Robots\getMap
getMap()
Definition
robots.php:15
Bitrix\Landing\Hook\Page\Robots\getTitle
getTitle()
Definition
robots.php:38
Bitrix\Landing\Hook\Page\Robots\enabledInEditMode
enabledInEditMode()
Definition
robots.php:47
Bitrix\Landing\Hook\Page\Robots\enabled
enabled()
Definition
robots.php:56
Bitrix\Landing\Hook\Page\Robots\exec
exec()
Definition
robots.php:65
Bitrix\Landing\Hook\Page
Definition
page.php:7
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Landing\Hook\Page
Definition
b24button.php:2
modules
landing
lib
hook
page
robots.php
Создано системой
1.10.0