|
@@ 316-325 (lines=10) @@
|
| 313 |
|
* @param array $attributes |
| 314 |
|
* @return string |
| 315 |
|
*/ |
| 316 |
|
public function style($collection, array $filters = [], array $attributes = []) |
| 317 |
|
{ |
| 318 |
|
$defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet']; |
| 319 |
|
|
| 320 |
|
$attributes = $attributes + $defaults; |
| 321 |
|
|
| 322 |
|
$attributes['href'] = $this->asset($collection, $filters); |
| 323 |
|
|
| 324 |
|
return '<link' . $this->html->attributes($attributes) . '>'; |
| 325 |
|
} |
| 326 |
|
|
| 327 |
|
/** |
| 328 |
|
* Return an array of script tags. |
|
@@ 355-370 (lines=16) @@
|
| 352 |
|
* @param array $attributes |
| 353 |
|
* @return array |
| 354 |
|
*/ |
| 355 |
|
public function styles($collection, array $filters = [], array $attributes = []) |
| 356 |
|
{ |
| 357 |
|
return array_map( |
| 358 |
|
function ($path) use ($attributes) { |
| 359 |
|
$defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet']; |
| 360 |
|
|
| 361 |
|
$attributes = $attributes + $defaults; |
| 362 |
|
|
| 363 |
|
$attributes['href'] = $path; |
| 364 |
|
|
| 365 |
|
return '<link' . $this->html->attributes($attributes) . '>'; |
| 366 |
|
}, |
| 367 |
|
$this->paths($collection, $filters) |
| 368 |
|
); |
| 369 |
|
} |
| 370 |
|
|
| 371 |
|
/** |
| 372 |
|
* Return an array of paths to an asset collection. |
| 373 |
|
* |