Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
robots.php
1<?php
3
4use \Bitrix\Landing\Field;
5use \Bitrix\Main\Localization\Loc;
6
7Loc::loadMessages(__FILE__);
8
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
24Allow: /folder1/
25Disallow: /file1.html
26Host: www.site.com
27
28User-agent: *
29Disallow: /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}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29