layout_discovery.post_update.php 669 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @file
  4. * Post update functions for layout discovery.
  5. */
  6. use Drupal\Core\Config\Entity\ConfigEntityUpdater;
  7. /**
  8. * Recalculate dependencies for the entity_form_display entity.
  9. */
  10. function layout_discovery_post_update_recalculate_entity_form_display_dependencies(&$sandbox = NULL) {
  11. \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'entity_form_display');
  12. }
  13. /**
  14. * Recalculate dependencies for the entity_view_display entity.
  15. */
  16. function layout_discovery_post_update_recalculate_entity_view_display_dependencies(&$sandbox = NULL) {
  17. \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'entity_view_display');
  18. }