- Модуль: salescenter
- Путь к файлу: ~/bitrix/modules/salescenter/lib/controller/order.php
- Класс: BitrixSalesCenterControllerOrder
- Вызов: Order::getProductImagePropertyDescription
private function getProductImagePropertyDescription($elementId = null): array
{
$result = [];
if ($elementId)
{
$imageProperty = $this->getProductImageProperty($elementId);
}
else
{
$imageProperty = $this->getDefaultImageProperty();
}
if ($imageProperty['entity'] === 'property')
{
$result['description'] = [
'entity' => $imageProperty['entity'],
'name' => 'PROPERTY_MORE_PHOTO',
'index' => 'MORE_PHOTO',
'propertyId' => $imageProperty['properties']['ID'],
'title' => $imageProperty['properties']['NAME'],
'editable' => true,
'required' => $imageProperty['properties']['IS_REQUIRED'] === 'Y',
'multiple' => $imageProperty['properties']['MULTIPLE'] === 'Y',
'defaultValue' => $imageProperty['properties']['DEFAULT_VALUE'],
'settings' => $imageProperty['properties'],
'type' => 'custom',
'data' => [
'view' => 'PROPERTY_MORE_PHOTO[VIEW_HTML]',
'data' => 'PROPERTY_MORE_PHOTO[EDIT_HTML]',
],
];
$result['values'] = $imageProperty['values'];
}
else
{
$result['description'] = [
'entity' => $imageProperty['entity'],
'name' => 'DETAIL_PICTURE',
'originalName' => 'DETAIL_PICTURE',
'title' => $imageProperty['properties']['NAME'],
'editable' => true,
'required' => $imageProperty['properties']['IS_REQUIRED'] === 'Y',
'defaultValue' => $imageProperty['properties']['DEFAULT_VALUE'],
'type' => 'custom',
'placeholders' => null,
'optionFlags' => 1,
'data' => [
'view' => 'DETAIL_PICTURE[VIEW_HTML]',
'data' => 'DETAIL_PICTURE[EDIT_HTML]',
],
];
$result['values'] = $imageProperty['values'];
}
return $result;
}