Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
automationtemplateprovider.php
1<?php
2
4
9
11{
12 protected const ENTITY_ID = 'bizproc-automation-template';
13 protected const TAB_ID = 'automation-templates';
14
15 public function __construct(array $options = [])
16 {
17 parent::__construct($options);
18 $this->options = [];
19 }
20
21 protected function addTemplatesTab(Dialog $dialog): void
22 {
23 $icon =
24 'data:image/svg+xml,%3Csvg width=%2224%22 height=%2224%22 viewBox=%220 0 24 24%22 fill=%22none%22'
25 . ' xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath'
26 . ' d=%22M16.9255 8.09465L17.7877 5.19898C17.8629 4.94722 17.7995 4.67404 17.6215 4.48235C17.4435'
27 . ' 4.29066 17.1779 4.20958 16.9248 4.26966C16.6717 4.32973 16.4695 4.52183 16.3944 4.77359L15.6559'
28 . ' 7.25933C13.36 6.04719 10.6225 6.05007 8.32912 7.26705L7.58698 4.77359C7.47085 4.3844 7.0648 4.16413'
29 . ' 6.68004 4.28159C6.29529 4.39906 6.07752 4.80979 6.19365 5.19898L7.05948 8.10606C5.11513 9.67809 3.98597'
30 . ' 12.0615 3.99271 14.5793C3.99271 19.1232 7.57607 18.0082 11.9998 18.0082C16.4235 18.0082 20.0069'
31 . ' 19.1232 20.0069 14.5793C20.0147 12.0547 18.8794 9.6655 16.9255 8.09465ZM11.9925 13.9615C8.83473'
32 . ' 13.9615 6.27363 14.2927 6.27363 12.9389C6.27363 11.5851 8.83473 10.4859 11.9925 10.4859C15.1502'
33 . ' 10.4859 17.7149 11.584 17.7149 12.9389C17.7149 14.2938 15.1538 13.9615 11.9925 13.9615ZM9.37673'
34 . ' 11.4998C8.9259 11.5831 8.61713 12.0071 8.67215 12.4673C8.72717 12.9276 9.12694 13.2649 9.58441'
35 . ' 13.2371C10.0419 13.2093 10.3988 12.826 10.399 12.3624C10.3479 11.8409 9.89305 11.4571 9.37673'
36 . ' 11.4998ZM13.9023 12.4699C13.9583 12.93 14.3586 13.2666 14.8161 13.2383C15.2736 13.2099 15.6303'
37 . ' 12.8263 15.6303 12.3627C15.5792 11.8397 15.1221 11.4553 14.6044 11.5001C14.1538 11.5849 13.8462'
38 . ' 12.0097 13.9023 12.4699Z%22 fill=%22%23525C69%22/%3E%3C/svg%3E%0A'
39 ;
40
41 $dialog->addTab(new Tab([
42 'id' => static::TAB_ID,
43 'title' => Loc::getMessage('BIZPROC_ENTITY_SELECTOR_TEMPLATES_TAB_AUTOMATION_TEMPLATES_TITLE'),
44 'itemOrder' => ['sort' => 'asc nulls last'],
45 'stub' => true,
46 'icon' => [
47 'default' => $icon, // /bitrix/js/ui/icon-set/main/images/robot.svg
48 'selected' => str_replace('525C69', 'fff', $icon),
49 ], // todo
50 ]));
51 }
52
54 {
55 return (
56 \Bitrix\Main\ORM\Query\Query::filter()
57 ->where('ACTIVE', 'Y')
58 ->where('AUTO_EXECUTE', \CBPDocumentEventType::Automation)
59 );
60 }
61}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29