|
@@ 323-332 (lines=10) @@
|
| 320 |
|
* @param array $attributes |
| 321 |
|
* @return string |
| 322 |
|
*/ |
| 323 |
|
public function style($collection, array $filters = [], array $attributes = []) |
| 324 |
|
{ |
| 325 |
|
$defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet']; |
| 326 |
|
|
| 327 |
|
$attributes = $attributes + $defaults; |
| 328 |
|
|
| 329 |
|
$attributes['href'] = $this->asset($collection, $filters); |
| 330 |
|
|
| 331 |
|
return '<link' . $this->html->attributes($attributes) . '>'; |
| 332 |
|
} |
| 333 |
|
|
| 334 |
|
/** |
| 335 |
|
* Return an array of script tags. |
|
@@ 362-377 (lines=16) @@
|
| 359 |
|
* @param array $attributes |
| 360 |
|
* @return array |
| 361 |
|
*/ |
| 362 |
|
public function styles($collection, array $filters = [], array $attributes = []) |
| 363 |
|
{ |
| 364 |
|
return array_map( |
| 365 |
|
function ($path) use ($attributes) { |
| 366 |
|
$defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet']; |
| 367 |
|
|
| 368 |
|
$attributes = $attributes + $defaults; |
| 369 |
|
|
| 370 |
|
$attributes['href'] = $path; |
| 371 |
|
|
| 372 |
|
return '<link' . $this->html->attributes($attributes) . '>'; |
| 373 |
|
}, |
| 374 |
|
$this->paths($collection, $filters) |
| 375 |
|
); |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
/** |
| 379 |
|
* Return an array of paths to an asset collection. |
| 380 |
|
* |