Start typing to see suggestions. Use arrow keys to navigate, Enter to select.

Preview

A collection of per-style previews, each holding a webfont file and text. Leaf instances (one file) are stored inside collection instances. Extends Collection for limit(), filter(), sort(), nth() etc.

Information

Property Value
Namespace NymarkType\Fountain
Extends Kirby\Toolkit\Collection
Implements Stringable, Traversable, IteratorAggregate, Countable
Source /classes/Preview.php

__construct()

No documentation available.

Parameters

Name Type Description
$items array
$text ?string
$file ?Kirby\Cms\File

fromFiles()

Build a Preview collection from a Files set, with shared text

Parameters

Name Type Description
$files Kirby\Cms\Files
$text ?string
Returns:
static

fromPages()

Build a Preview collection from Pages, merging each page's own Preview

Parameters

Name Type Description
$pages Kirby\Cms\Pages
Returns:
static

file()

Webfont file β€” own file on a leaf, first item's file on a collection

Returns:
?Kirby\Cms\File

files()

All webfont files across every item in the collection

Returns:
?Kirby\Cms\Files

text()

Preview text β€” own text on a leaf, first item's text on a collection

Returns:
?string

fontName()

CSS font-family name

Returns:
?string