PSA for Drupal devs: stop copying your content structure 1:1 during migrations. Learn how to transform and improve it along the way. Our latest expert-written migration guide walks you through custom source plugins and more. https://bit.ly/3CT2Iny

#DrupalTips #DrupalMigration

Migrating Your Data from D7 to D10: Migrating media. Creating custom source plugins. Migration How-to: # 28

In the previous article, we learned how to migrate paragraphs and create custom process plugins. Good exercise for the brain. Today, we will do some exercises for the body. Get ready for a strength training session — Drupal style — where we will learn about creating custom source plugins, extending existing ones, and writing media migrations from scratch.

Tag1 Consulting

#Drupal How to render an entity programmatically in a view mode only if said view mode exists:

`
$view_modes = $this->entityDisplayRepository->getViewModeOptionsByBundle($entity->getEntityTypeId(), $entity->bundle());
if (!empty($view_modes[$view_mode])) {
$builder = $this->entityTypeManager->getViewBuilder($entity->getEntityTypeId());
$build = $builder->view($entity, $view_mode);
}
`

#Drupaltips