Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
rendercontrolcollectioncontent.php
1<?php
2
4
6
8{
9 private \CBPDocumentService $documentService;
10 private array $rendered = [];
11
12 public function __construct()
13 {
14 $this->documentService = \CBPRuntime::getRuntime()->getDocumentService();
15 }
16
17 public function addProperty(array $documentType, array $property, array $params): static
18 {
19 $this->rendered[] = $this->documentService->getFieldInputControl(
20 $documentType,
21 $property,
22 $params['Field'],
23 $params['Value'],
24 (bool)$params['Als'],
25 $params['RenderMode'] === 'public'
26 );
27
28 return $this;
29 }
30
34 public function getRenderedProperties(): array
35 {
36 return $this->rendered;
37 }
38
39 public function getHtml(): string
40 {
41 // Rendered controls should be stored separately for now
42 // e.g. in addition params of Bitrix\Main\Engine\Response\HtmlContent
43 return '';
44 }
45}