@@ 110-125 (lines=16) @@ | ||
107 | * @throws InvalidEntityException |
|
108 | * @since 4.9.62.p |
|
109 | */ |
|
110 | public function addJavascript( |
|
111 | $handle, |
|
112 | $source, |
|
113 | array $dependencies = array(), |
|
114 | $load_in_footer = true |
|
115 | ) { |
|
116 | $asset = new JavascriptAsset( |
|
117 | $handle, |
|
118 | $source, |
|
119 | array_unique($dependencies), |
|
120 | $load_in_footer, |
|
121 | $this->domain |
|
122 | ); |
|
123 | $this->assets->add($asset, $handle); |
|
124 | return $asset; |
|
125 | } |
|
126 | ||
127 | ||
128 | /** |
|
@@ 194-209 (lines=16) @@ | ||
191 | * @throws InvalidEntityException |
|
192 | * @since 4.9.62.p |
|
193 | */ |
|
194 | public function addStylesheet( |
|
195 | $handle, |
|
196 | $source, |
|
197 | array $dependencies = array(), |
|
198 | $media = 'all' |
|
199 | ) { |
|
200 | $asset = new StylesheetAsset( |
|
201 | $handle, |
|
202 | $source, |
|
203 | array_unique($dependencies), |
|
204 | $this->domain, |
|
205 | $media |
|
206 | ); |
|
207 | $this->assets->add($asset, $handle); |
|
208 | return $asset; |
|
209 | } |
|
210 | ||
211 | ||
212 | /** |