1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
automationsettings.php
См. документацию.
1<?php
2
4
5use Bitrix\Intranet\Settings\Search\SearchEngine;
6use Bitrix\Intranet\Settings\AbstractSettings;
8use Bitrix\Intranet;
10
11class AutomationSettings extends AbstractSettings
12{
13 public const TYPE = 'automation';
14
15 public function getType(): string
16 {
17 return 'automation';
18 }
19
20 public function save(): Result
21 {
22 $manager = new Manager();
23
24 foreach ($this->data as $code => $value)
25 {
26 $item = $manager->getControl($code);
27 if ($item)
28 {
29 $manager->saveControlValue($code, $value);
30 }
31 }
32
33 return new Result();
34 }
35
36 public function get(): Intranet\Settings\SettingsInterface
37 {
38 $manager = new Manager();
39
40 $data = [];
41 foreach ($manager->getList() as $code => $control)
42 {
44 }
45
46 return new static($data);
47 }
48
49 public function find(string $query): array
50 {
51 $manager = new Manager();
52
53 $fields = [];
54 foreach ($manager->getList() as $control)
55 {
56 $data = $control->jsonSerialize();
57 $fields[$control->getId()] = $data['label'] ?? $data['title'];
58 }
59
60 return SearchEngine::initWithDefaultFormatter($fields)->find($query);
61 }
62}
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$query
Определения get_search.php:11
$control
Определения iblock_catalog_edit.php:61
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$manager
Определения office365push.php:39
$fields
Определения yandex_run.php:501