| @@ 140-153 (lines=14) @@ | ||
| 137 | * @throws InvalidEntityException |
|
| 138 | * @throws DuplicateCollectionIdentifierException |
|
| 139 | */ |
|
| 140 | public function addEditorScript($handle, array $dependencies = array()) |
|
| 141 | { |
|
| 142 | if($this->assets->has($handle)){ |
|
| 143 | return $this->assets->get($handle); |
|
| 144 | } |
|
| 145 | return parent::addJavascript( |
|
| 146 | $handle, |
|
| 147 | $this->registry->getJsUrl( |
|
| 148 | $this->domain->assetNamespace(), |
|
| 149 | $handle |
|
| 150 | ), |
|
| 151 | $this->addDefaultBlockScriptDependencies($dependencies) |
|
| 152 | ); |
|
| 153 | } |
|
| 154 | ||
| 155 | ||
| 156 | /** |
|
| @@ 165-178 (lines=14) @@ | ||
| 162 | * @throws InvalidEntityException |
|
| 163 | * @throws DuplicateCollectionIdentifierException |
|
| 164 | */ |
|
| 165 | public function addEditorStyle($handle, array $dependencies = array()) |
|
| 166 | { |
|
| 167 | if ($this->assets->has($handle)) { |
|
| 168 | return $this->assets->get($handle); |
|
| 169 | } |
|
| 170 | return parent::addStylesheet( |
|
| 171 | $handle, |
|
| 172 | $this->registry->getCssUrl( |
|
| 173 | $this->domain->assetNamespace(), |
|
| 174 | $handle |
|
| 175 | ), |
|
| 176 | $dependencies |
|
| 177 | ); |
|
| 178 | } |
|
| 179 | ||
| 180 | ||
| 181 | /** |
|
| @@ 190-203 (lines=14) @@ | ||
| 187 | * @throws InvalidEntityException |
|
| 188 | * @throws DuplicateCollectionIdentifierException |
|
| 189 | */ |
|
| 190 | public function addScript($handle, array $dependencies = array()) |
|
| 191 | { |
|
| 192 | if ($this->assets->has($handle)) { |
|
| 193 | return $this->assets->get($handle); |
|
| 194 | } |
|
| 195 | return parent::addJavascript( |
|
| 196 | $handle, |
|
| 197 | $this->registry->getJsUrl( |
|
| 198 | $this->domain->assetNamespace(), |
|
| 199 | $handle |
|
| 200 | ), |
|
| 201 | $this->addDefaultBlockScriptDependencies($dependencies) |
|
| 202 | ); |
|
| 203 | } |
|
| 204 | ||
| 205 | ||
| 206 | /** |
|
| @@ 215-228 (lines=14) @@ | ||
| 212 | * @throws InvalidEntityException |
|
| 213 | * @throws DuplicateCollectionIdentifierException |
|
| 214 | */ |
|
| 215 | public function addStyle($handle, array $dependencies = array()) |
|
| 216 | { |
|
| 217 | if ($this->assets->has($handle)) { |
|
| 218 | return $this->assets->get($handle); |
|
| 219 | } |
|
| 220 | return parent::addStylesheet( |
|
| 221 | $handle, |
|
| 222 | $this->registry->getCssUrl( |
|
| 223 | $this->domain->assetNamespace(), |
|
| 224 | $handle |
|
| 225 | ), |
|
| 226 | $dependencies |
|
| 227 | ); |
|
| 228 | } |
|
| 229 | ||
| 230 | ||
| 231 | /** |
|