You are here

function social_post_photo_uninstall in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  2. 8 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  3. 8.2 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  4. 8.3 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  5. 8.4 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  6. 8.5 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  7. 8.6 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  8. 8.7 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  9. 8.8 modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  10. 10.3.x modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  11. 10.0.x modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()
  12. 10.1.x modules/social_features/social_post/modules/social_post_photo/social_post_photo.install \social_post_photo_uninstall()

Uninstall hook for Social Post Photo.

File

modules/social_features/social_post/modules/social_post_photo/social_post_photo.install, line 66
The Social post photo installation.

Code

function social_post_photo_uninstall() {

  // Change photo to post.
  _social_post_photo_settype('photo', 'post');
  $configs = [
    'core.entity_form_display.post.photo.default',
    'core.entity_form_display.post.photo.group',
    'core.entity_form_display.post.photo.profile',
    'core.entity_view_display.post.photo.activity',
    'core.entity_view_display.post.photo.activity_comment',
    'core.entity_view_display.post.photo.default',
    'field.field.post.photo.field_post',
    'field.field.post.photo.field_post_comments',
    'field.field.post.photo.field_post_image',
    'field.field.post.photo.field_recipient_group',
    'field.field.post.photo.field_recipient_user',
    'field.field.post.photo.field_visibility',
    'field.storage.post.field_post_image',
    'image.style.social_post_photo',
    'social_post.post_type.photo',
  ];
  foreach ($configs as $config) {

    // Deleting config.
    \Drupal::configFactory()
      ->getEditable($config)
      ->delete();
  }
}