You are here

public function Font::isActivated in @font-your-face 8.3

Checks if the font is enabled.

Return value

bool TRUE is font is enabled. FALSE otherwise.

Overrides FontInterface::isActivated

2 calls to Font::isActivated()
Font::activate in src/Entity/Font.php
Enable a font.
Font::isDeactivated in src/Entity/Font.php
Checks if the font is disabled.

File

src/Entity/Font.php, line 119

Class

Font
Defines the Font entity.

Namespace

Drupal\fontyourface\Entity

Code

public function isActivated() {
  $config = \Drupal::config('fontyourface.settings');
  $enabled_fonts = $config
    ->get('enabled_fonts');
  return in_array($this->url->value, $enabled_fonts);
}