You are here

function social_install_tasks in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 social.profile \social_install_tasks()
  2. 8 social.profile \social_install_tasks()
  3. 8.2 social.profile \social_install_tasks()
  4. 8.3 social.profile \social_install_tasks()
  5. 8.4 social.profile \social_install_tasks()
  6. 8.5 social.profile \social_install_tasks()
  7. 8.6 social.profile \social_install_tasks()
  8. 8.7 social.profile \social_install_tasks()
  9. 8.8 social.profile \social_install_tasks()
  10. 10.3.x social.profile \social_install_tasks()
  11. 10.0.x social.profile \social_install_tasks()
  12. 10.2.x social.profile \social_install_tasks()

Implements hook_install_tasks().

File

./social.profile, line 14
Enables modules and site configuration for a social site installation.

Code

function social_install_tasks(&$install_state) {
  $tasks = [];

  // If the user has selected that demo content should be installed then we add
  // this as an extra install step.
  if (\Drupal::state()
    ->get('social_install_demo_content', 0) === 1) {
    $tasks['social_install_demo_content'] = [
      'display_name' => t('Install demo content'),
      'display' => TRUE,
      'type' => 'batch',
    ];
  }
  return $tasks;
}