Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
asset.php
1<?php
2
4
5class Asset implements TolokaTransferObject
6{
10 private $scriptUrls = [];
11
17 public function __construct()
18 {
19 $this->scriptUrls[] = '$TOLOKA_ASSETS/js/toloka-handlebars-templates.js';
20 }
21
25 public function getScriptUrls(): array
26 {
27 return $this->scriptUrls;
28 }
29
30
36 public function setScriptUrls(array $scriptUrls): Asset
37 {
38 $this->scriptUrls = $scriptUrls;
39
40 return $this;
41 }
42
43
49 public function addScriptUrl(string $scriptUrl): Asset
50 {
51 $this->scriptUrls[] = $scriptUrl;
52
53 return $this;
54 }
55
56
57 public function toArray():array
58 {
59 return [
60 'script_urls' => $this->scriptUrls,
61 ];
62 }
63}