You are here

public function SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  2. 8 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  3. 8.2 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  4. 8.3 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  5. 8.4 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  6. 8.5 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  7. 8.6 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  8. 8.7 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  9. 8.8 modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  10. 10.0.x modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  11. 10.1.x modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
  12. 10.2.x modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php \Drupal\social_file_private\SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()

Get all the file and image fields to protect.

@todo Retrieve the file and image fields programmatically.

Note: this list is now fixed, but an error will be shown in the status report when there are fields of type image, file using public uri_scheme.

Return value

array Returns an array containing config_names.

1 call to SocialFilePrivateFieldsConfigOverride::getFileImageFieldsToProtect()
SocialFilePrivateFieldsConfigOverride::loadOverrides in modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php
Returns config overrides.

File

modules/custom/social_file_private/src/SocialFilePrivateFieldsConfigOverride.php, line 30

Class

SocialFilePrivateFieldsConfigOverride
Class SocialFilePrivateFieldsConfigOverride.

Namespace

Drupal\social_file_private

Code

public function getFileImageFieldsToProtect() {

  // We want to override all the known file and image uploads.
  $config_names = [
    'field.storage.block_content.field_hero_image',
    'field.storage.comment.field_comment_files',
    'field.storage.group.field_group_image',
    'field.storage.node.field_book_image',
    'field.storage.node.field_event_image',
    'field.storage.node.field_files',
    'field.storage.node.field_page_image',
    'field.storage.node.field_topic_image',
    'field.storage.post.field_post_image',
    'field.storage.profile.field_profile_image',
    'field.storage.profile.field_profile_banner_image',
    'field.storage.paragraph.field_hero_image',
    'field.storage.paragraph.field_hero_small_image',
  ];
  return $config_names;
}