You are here

public function DrupalApplication::getSiteName in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 8 src/SyncCoreInterface/DrupalApplication.php \Drupal\cms_content_sync\SyncCoreInterface\DrupalApplication::getSiteName()
  2. 2.1.x src/SyncCoreInterface/DrupalApplication.php \Drupal\cms_content_sync\SyncCoreInterface\DrupalApplication::getSiteName()

File

src/SyncCoreInterface/DrupalApplication.php, line 160

Class

DrupalApplication
Class DrupalApplication.

Namespace

Drupal\cms_content_sync\SyncCoreInterface

Code

public function getSiteName() {
  $name = getenv('CONTENT_SYNC_SITE_NAME');
  if ($name) {
    return $name;
  }
  try {
    return ContentSyncSettings::getInstance()
      ->getSiteName();
  } catch (\Exception $e) {
    return \Drupal::config('system.site')
      ->get('name');
  }
}