Skip to content

Instantly share code, notes, and snippets.

@ValeriiVasyliev
Last active May 26, 2017 07:31
Show Gist options
  • Save ValeriiVasyliev/58e8cd6043eb8d7e41571ea9a1cfa5a2 to your computer and use it in GitHub Desktop.
Save ValeriiVasyliev/58e8cd6043eb8d7e41571ea9a1cfa5a2 to your computer and use it in GitHub Desktop.
Drupal 8. Get all multisites names
<?php
$multisites = [];
if (is_file(DRUPAL_ROOT . '/sites/sites.php')) {
include DRUPAL_ROOT . '/sites/sites.php';
$multisites = array_keys($sites);
$multisites[] = 'default';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment