1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
iblockvalues.php
См. документацию.
1
<?php
7
namespace
Bitrix\Iblock\InheritedProperty;
8
9
class
IblockValues
extends
BaseValues
10
{
14
public
function
__construct
(
$iblockId
)
15
{
16
parent::__construct(
$iblockId
);
17
}
18
24
public
function
getValueTableName
()
25
{
26
return
"b_iblock_iblock_iprop"
;
27
}
28
34
public
function
getType
()
35
{
36
return
"B"
;
37
}
38
44
public
function
getId
()
45
{
46
return
$this->iblockId
;
47
}
48
54
public
function
createTemplateEntity
()
55
{
56
return
new \Bitrix\Iblock\Template\Entity\Iblock($this->iblockId);
57
}
58
64
public
function
getParents
()
65
{
66
return
array
();
67
}
68
75
public
function
queryValues
()
76
{
77
$result
=
array
();
78
if
($this->
hasTemplates
())
79
{
80
$connection
=
\Bitrix\Main\Application::getConnection
();
81
$query
=
$connection
->query(
"
82
SELECT
83
P.ID
84
,P.CODE
85
,P.TEMPLATE
86
,P.ENTITY_TYPE
87
,P.ENTITY_ID
88
,IP.VALUE
89
FROM
90
b_iblock_iblock_iprop IP
91
INNER JOIN b_iblock_iproperty P ON P.ID = IP.IPROP_ID
92
WHERE
93
IP.IBLOCK_ID = "
.$this->iblockId.
"
94
"
);
95
96
while
($row =
$query
->fetch())
97
{
98
$result
[$row[
"CODE"
]] = $row;
99
}
100
101
if
(empty(
$result
))
102
{
103
$result
= parent::queryValues();
104
$fields
=
array
(
105
"IBLOCK_ID"
,
106
"IPROP_ID"
,
107
);
108
$rows
=
array
();
109
foreach
(
$result
as $row)
110
{
111
$rows
[] =
array
(
112
'IBLOCK_ID'
=> $this->iblockId,
113
'IPROP_ID'
=> $row[
"ID"
],
114
'VALUE'
=> $row[
"VALUE"
],
115
);
116
}
117
$this->
insertValues
(
"b_iblock_iblock_iprop"
,
$fields
,
$rows
);
118
}
119
}
120
return
$result
;
121
}
122
128
function
clearValues
()
129
{
130
$connection
=
\Bitrix\Main\Application::getConnection
();
131
$connection
->query(
"
132
DELETE FROM b_iblock_element_iprop
133
WHERE IBLOCK_ID = "
.$this->iblockId.
"
134
"
);
135
$connection
->query(
"
136
DELETE FROM b_iblock_section_iprop
137
WHERE IBLOCK_ID = "
.$this->iblockId.
"
138
"
);
139
$connection
->query(
"
140
DELETE FROM b_iblock_iblock_iprop
141
WHERE IBLOCK_ID = "
.$this->iblockId.
"
142
"
);
143
}
144
}
$connection
$connection
Определения
actionsdefinitions.php:38
Bitrix\Iblock\InheritedProperty\BaseValues
Определения
basevalues.php:10
Bitrix\Iblock\InheritedProperty\BaseValues\$iblockId
$iblockId
Определения
basevalues.php:12
Bitrix\Iblock\InheritedProperty\BaseValues\hasTemplates
hasTemplates()
Определения
basevalues.php:159
Bitrix\Iblock\InheritedProperty\BaseValues\insertValues
insertValues($tableName, $primaryFields, $rows)
Определения
basevalues.php:207
Bitrix\Iblock\InheritedProperty\IblockValues
Определения
iblockvalues.php:10
Bitrix\Iblock\InheritedProperty\IblockValues\__construct
__construct($iblockId)
Определения
iblockvalues.php:14
Bitrix\Iblock\InheritedProperty\IblockValues\getId
getId()
Определения
iblockvalues.php:44
Bitrix\Iblock\InheritedProperty\IblockValues\getValueTableName
getValueTableName()
Определения
iblockvalues.php:24
Bitrix\Iblock\InheritedProperty\IblockValues\getParents
getParents()
Определения
iblockvalues.php:64
Bitrix\Iblock\InheritedProperty\IblockValues\clearValues
clearValues()
Определения
iblockvalues.php:128
Bitrix\Iblock\InheritedProperty\IblockValues\getType
getType()
Определения
iblockvalues.php:34
Bitrix\Iblock\InheritedProperty\IblockValues\createTemplateEntity
createTemplateEntity()
Определения
iblockvalues.php:54
Bitrix\Iblock\InheritedProperty\IblockValues\queryValues
queryValues()
Определения
iblockvalues.php:75
Bitrix\Main\Application\getConnection
static getConnection($name="")
Определения
application.php:638
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$query
$query
Определения
get_search.php:11
$rows
$rows
Определения
options.php:264
$fields
$fields
Определения
yandex_run.php:501
bitrix
modules
iblock
lib
inheritedproperty
iblockvalues.php
Создано системой
1.14.0