1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
seo.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing\Source;
3
4
class
Seo
5
{
6
const
TITLE
=
'title'
;
7
const
BROWSER_TITLE
=
'browser_title'
;
8
const
KEYWORDS
=
'keywords'
;
9
const
DESCRIPTION
=
'description'
;
10
12
protected
$properties
= [];
13
14
public
function
__construct
()
15
{
16
17
}
18
23
public
function
setProperties
(
array
$values)
24
{
25
$values = array_filter($values, [__CLASS__,
'clearValues'
], ARRAY_FILTER_USE_BOTH);
26
if
(!empty($values))
27
{
28
$this->properties = array_merge($this->properties, $values);
29
}
30
}
31
37
public
function
setProperty
(
$name
, $value)
38
{
39
$name
= (string)
$name
;
40
if
(
$name
!==
''
&& $value !==
null
)
41
{
42
$this->properties[
$name
] = $value;
43
}
44
}
45
49
public
function
getProperties
()
50
{
51
return
(!empty($this->properties) ? $this->properties :
null
);
52
}
53
58
public
function
getProperty
(
$name
)
59
{
60
$name
= (string)
$name
;
61
if
(
$name
!==
''
)
62
{
63
return
(isset($this->properties[
$name
]) ? $this->properties[
$name
] :
null
);
64
}
65
return
null
;
66
}
67
71
public
function
clear
()
72
{
73
$this->
clearProperties
();
74
}
75
79
public
function
clearProperties
()
80
{
81
$this->properties = [];
82
}
83
88
public
function
clearProperty
(
$name
)
89
{
90
$name
= (string)
$name
;
91
if
(
$name
!==
''
&& isset($this->properties[
$name
]))
92
{
93
unset($this->properties[
$name
]);
94
}
95
}
96
101
public
function
setTitle
($value)
102
{
103
if
(is_string($value))
104
{
105
$this->
setProperty
(self::TITLE, strip_tags(trim($value)));
106
}
107
}
108
113
public
function
setBrowserTitle
($value)
114
{
115
if
(is_string($value))
116
{
117
$this->
setProperty
(self::BROWSER_TITLE, strip_tags(trim($value)));
118
}
119
}
120
125
public
function
setKeywords
($value)
126
{
127
if
(is_array($value))
128
{
129
$value = array_filter($value, [__CLASS__,
'clearValues'
], ARRAY_FILTER_USE_BOTH);
130
$value = implode(
', '
, $value);
131
}
132
if
(is_string($value))
133
{
134
$this->
setProperty
(self::KEYWORDS, strip_tags(trim($value)));
135
}
136
}
137
142
public
function
setDescription
($value)
143
{
144
if
(is_string($value))
145
{
146
$this->
setProperty
(self::DESCRIPTION, strip_tags(trim($value)));
147
}
148
}
149
153
public
function
getTitle
()
154
{
155
return
$this->
getProperty
(self::TITLE);
156
}
157
161
public
function
getBrowserTitle
()
162
{
163
return
$this->
getProperty
(self::BROWSER_TITLE);
164
}
165
169
public
function
getKeywords
()
170
{
171
return
$this->
getProperty
(self::KEYWORDS);
172
}
173
177
public
function
getDescription
()
178
{
179
return
$this->
getProperty
(self::DESCRIPTION);
180
}
181
187
protected
static
function
clearValues
($value,
$name
)
188
{
189
return
((
string
)
$name
!==
''
&& $value !==
null
);
190
}
191
}
Bitrix\Landing\Landing\Seo
Определения
seo.php:7
Bitrix\Landing\Source\Seo\__construct
__construct()
Определения
seo.php:14
Bitrix\Landing\Source\Seo\clearValues
static clearValues($value, $name)
Определения
seo.php:187
Bitrix\Landing\Source\Seo\getDescription
getDescription()
Определения
seo.php:177
Bitrix\Landing\Source\Seo\setDescription
setDescription($value)
Определения
seo.php:142
Bitrix\Landing\Source\Seo\setBrowserTitle
setBrowserTitle($value)
Определения
seo.php:113
Bitrix\Landing\Source\Seo\clearProperties
clearProperties()
Определения
seo.php:79
Bitrix\Landing\Source\Seo\setTitle
setTitle($value)
Определения
seo.php:101
Bitrix\Landing\Source\Seo\getBrowserTitle
getBrowserTitle()
Определения
seo.php:161
Bitrix\Landing\Source\Seo\setProperties
setProperties(array $values)
Определения
seo.php:23
Bitrix\Landing\Source\Seo\getKeywords
getKeywords()
Определения
seo.php:169
Bitrix\Landing\Source\Seo\TITLE
const TITLE
Определения
seo.php:6
Bitrix\Landing\Source\Seo\$properties
$properties
Определения
seo.php:12
Bitrix\Landing\Source\Seo\getTitle
getTitle()
Определения
seo.php:153
Bitrix\Landing\Source\Seo\BROWSER_TITLE
const BROWSER_TITLE
Определения
seo.php:7
Bitrix\Landing\Source\Seo\getProperty
getProperty($name)
Определения
seo.php:58
Bitrix\Landing\Source\Seo\clear
clear()
Определения
seo.php:71
Bitrix\Landing\Source\Seo\KEYWORDS
const KEYWORDS
Определения
seo.php:8
Bitrix\Landing\Source\Seo\DESCRIPTION
const DESCRIPTION
Определения
seo.php:9
Bitrix\Landing\Source\Seo\getProperties
getProperties()
Определения
seo.php:49
Bitrix\Landing\Source\Seo\setKeywords
setKeywords($value)
Определения
seo.php:125
Bitrix\Landing\Source\Seo\setProperty
setProperty($name, $value)
Определения
seo.php:37
Bitrix\Landing\Source\Seo\clearProperty
clearProperty($name)
Определения
seo.php:88
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$name
$name
Определения
menu_edit.php:35
bitrix
modules
landing
lib
source
seo.php
Создано системой
1.14.0