Loading src/Plugin/warmer/ViewModeWarmer.php +13 −9 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ final class ViewModeWarmer extends WarmerPluginBase { */ private EntityDisplayRepositoryInterface $entityDisplayRepository; /** * The renderer. * * @var \Drupal\Core\Render\RendererInterface */ private RendererInterface $renderer; /** Loading Loading @@ -138,7 +143,7 @@ final class ViewModeWarmer extends WarmerPluginBase { $output[] = [ $entity_type_id, $view_mode_id, $entity $entity, ]; } } Loading Loading @@ -187,7 +192,8 @@ final class ViewModeWarmer extends WarmerPluginBase { && $entity_type instanceof EntityPublishedInterface ) { $onlyPublished = TRUE; } else { } else { $onlyPublished = FALSE; } $entityStorage = $this->entityTypeManager->getStorage($entity_type_id); Loading Loading @@ -250,14 +256,14 @@ final class ViewModeWarmer extends WarmerPluginBase { '#options' => $options, '#default_value' => empty($configuration['entity_view_modes']) ? [] : $configuration['entity_view_modes'], '#multiple' => TRUE, '#attributes' => ['style' => 'min-height: 60em;'] '#attributes' => ['style' => 'min-height: 60em;'], ]; $form['published'] = [ '#type' => 'checkbox', '#title' => $this->t('Only warm published entities'), '#default_value' => $configuration['published'], '#description' => $this->t('If the entity type supports publishing.') '#description' => $this->t('If the entity type supports publishing.'), ]; return $form; Loading Loading @@ -294,6 +300,4 @@ final class ViewModeWarmer extends WarmerPluginBase { return $entity_view_modes; } } Loading
src/Plugin/warmer/ViewModeWarmer.php +13 −9 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ final class ViewModeWarmer extends WarmerPluginBase { */ private EntityDisplayRepositoryInterface $entityDisplayRepository; /** * The renderer. * * @var \Drupal\Core\Render\RendererInterface */ private RendererInterface $renderer; /** Loading Loading @@ -138,7 +143,7 @@ final class ViewModeWarmer extends WarmerPluginBase { $output[] = [ $entity_type_id, $view_mode_id, $entity $entity, ]; } } Loading Loading @@ -187,7 +192,8 @@ final class ViewModeWarmer extends WarmerPluginBase { && $entity_type instanceof EntityPublishedInterface ) { $onlyPublished = TRUE; } else { } else { $onlyPublished = FALSE; } $entityStorage = $this->entityTypeManager->getStorage($entity_type_id); Loading Loading @@ -250,14 +256,14 @@ final class ViewModeWarmer extends WarmerPluginBase { '#options' => $options, '#default_value' => empty($configuration['entity_view_modes']) ? [] : $configuration['entity_view_modes'], '#multiple' => TRUE, '#attributes' => ['style' => 'min-height: 60em;'] '#attributes' => ['style' => 'min-height: 60em;'], ]; $form['published'] = [ '#type' => 'checkbox', '#title' => $this->t('Only warm published entities'), '#default_value' => $configuration['published'], '#description' => $this->t('If the entity type supports publishing.') '#description' => $this->t('If the entity type supports publishing.'), ]; return $form; Loading Loading @@ -294,6 +300,4 @@ final class ViewModeWarmer extends WarmerPluginBase { return $entity_view_modes; } }