You are here

public static function FontDisplay::loadByTheme in @font-your-face 8.3

Returns FontDisplays by theme name.

Parameters

string $theme: Name of theme.

Return value

array List of font style configs for theme.

Overrides FontDisplayInterface::loadByTheme

2 calls to FontDisplay::loadByTheme()
fontyourface_library_info_build in ./fontyourface.module
Implements hook_library_info_build().
fontyourface_page_attachments in ./fontyourface.module
Implements hook_page_attachments().

File

src/Entity/FontDisplay.php, line 184

Class

FontDisplay
Defines the Font display entity.

Namespace

Drupal\fontyourface\Entity

Code

public static function loadByTheme($theme) {
  return \Drupal::entityTypeManager()
    ->getStorage('font_display')
    ->loadByProperties([
    'theme' => $theme,
  ]);
}