private function FontDisplayForm::getDefaultSelectorOption in @font-your-face 8.3
Return string that maps to selector.
Parameters
\Drupal\fontyourface\FontDisplayInterface $font_display: Current Font Display entity.
Return value
string String that maps to preset selector. 'Other' or empty string otherwise.
1 call to FontDisplayForm::getDefaultSelectorOption()
- FontDisplayForm::form in src/
Form/ FontDisplayForm.php - Gets the actual form array to be built.
File
- src/
Form/ FontDisplayForm.php, line 216
Class
- FontDisplayForm
- Form to display fonts.
Namespace
Drupal\fontyourface\FormCode
private function getDefaultSelectorOption(FontDisplayInterface $font_display) {
$preset_selectors = $this
->getPresetSelectors();
$font_selector = $font_display
->getSelectors();
if (!empty($preset_selectors[$font_selector])) {
return $font_selector;
}
elseif (!empty($font_selector)) {
return 'other';
}
return '';
}