@@ 70-84 (lines=15) @@ | ||
67 | * @return JavascriptAsset[]|StylesheetAsset[]|ManifestFile[] |
|
68 | * @since 4.9.62.p |
|
69 | */ |
|
70 | protected function getAssetsOfType($type) |
|
71 | { |
|
72 | $files = array(); |
|
73 | $this->rewind(); |
|
74 | while ($this->valid()) { |
|
75 | /** @var Asset $asset */ |
|
76 | $asset = $this->current(); |
|
77 | if ($asset->type() === $type) { |
|
78 | $files[ $asset->handle() ] = $asset; |
|
79 | } |
|
80 | $this->next(); |
|
81 | } |
|
82 | $this->rewind(); |
|
83 | return $files; |
|
84 | } |
|
85 | ||
86 | ||
87 | /** |
|
@@ 91-105 (lines=15) @@ | ||
88 | * @return JavascriptAsset[] |
|
89 | * @since 4.9.62.p |
|
90 | */ |
|
91 | public function getJavascriptAssetsWithData() |
|
92 | { |
|
93 | $files = array(); |
|
94 | $this->rewind(); |
|
95 | while ($this->valid()) { |
|
96 | /** @var JavascriptAsset $asset */ |
|
97 | $asset = $this->current(); |
|
98 | if ($asset->type() === Asset::TYPE_JS && $asset->hasInlineData()) { |
|
99 | $files[ $asset->handle() ] = $asset; |
|
100 | } |
|
101 | $this->next(); |
|
102 | } |
|
103 | $this->rewind(); |
|
104 | return $files; |
|
105 | } |
|
106 | ||
107 | ||
108 | /** |