You are here

function social_activity_get_der_settings in Open Social 8.5

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

Get entity view mode settings for Dynamic Entity Reference update.

Return value

array View mode settings, keyed by entity machine name.

1 call to social_activity_get_der_settings()
social_activity_update_8003 in modules/social_features/social_activity/social_activity.install
Update Dynamic Entity Reference.

File

modules/social_features/social_activity/social_activity.install, line 196
The Social activity install.

Code

function social_activity_get_der_settings() {
  $result = [];
  $settings = [
    'activity' => [
      'comment',
      'node',
      'post',
    ],
    'stream' => [
      'group',
    ],
    'default' => [
      'crop',
      'event_enrollment',
      'flagging',
      'message',
      'search_api_task',
      'activity',
      'block_content',
      'menu_link_content',
      'file',
      'group_content',
      'profile',
      'taxonomy_term',
      'user',
    ],
  ];
  foreach ($settings as $view_mode => $entities) {
    foreach ($entities as $entity) {
      $result[$entity]['view_mode'] = $view_mode;
    }
  }
  return $result;
}