1 | <?php |
||
22 | class AssetHandlerConnectorStates implements SingletonInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var bool |
||
26 | */ |
||
27 | private $defaultAssetsIncluded = false; |
||
28 | |||
29 | /** |
||
30 | * Storage for JavaScript files which were already included. It will handle |
||
31 | * multiple instance of forms in the same page, by avoiding multiple |
||
32 | * inclusions of the same JavaScript files. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | private $alreadyIncludedValidationJavaScriptFiles = []; |
||
37 | |||
38 | /** |
||
39 | * @param bool $flag |
||
40 | */ |
||
41 | public function markDefaultAssetsAsIncluded($flag = true) |
||
45 | |||
46 | /** |
||
47 | * @return bool |
||
48 | */ |
||
49 | public function defaultAssetsWereIncluded() |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getAlreadyIncludedValidationJavaScriptFiles() |
||
61 | |||
62 | /** |
||
63 | * Saves a file path as already included, so it can be retrieved later and |
||
64 | * not being included twice. |
||
65 | * |
||
66 | * @param string $file |
||
67 | */ |
||
68 | public function registerIncludedValidationJavaScriptFiles($file) |
||
72 | } |
||
73 |