function fontyourface_update_8004 in @font-your-face 8.3
Updates fontyourface font displays to be stored in files.
File
- ./
fontyourface.install, line 225 - Font-Your-Face install/update/uninstall hook implementation.
Code
function fontyourface_update_8004() {
$pager = 0;
while (TRUE) {
$storage_handler = \Drupal::entityTypeManager()
->getStorage('font_display');
$fdids = \Drupal::entityQuery('font_display')
->range($pager, 50)
->execute();
if (!empty($fdids)) {
$styles = $storage_handler
->loadMultiple(array_keys($fdids));
foreach ($styles as $style) {
fontyourface_save_and_generate_font_display_css($style);
}
}
else {
break;
}
$pager++;
}
}