3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Backdrop-specific logic that differs from Drupal.
21 class CRM_Utils_System_Backdrop
extends CRM_Utils_System_DrupalBase
{
26 public function createUser(&$params, $mail) {
27 $form_state = form_state_defaults();
29 $form_state['input'] = [
30 'name' => $params['cms_name'],
31 'mail' => $params[$mail],
32 'op' => 'Create new account',
35 $admin = user_access('administer users');
36 if (!config_get('system.core', 'user_email_verification') ||
$admin) {
37 $form_state['input']['pass'] = ['pass1' => $params['cms_pass'], 'pass2' => $params['cms_pass']];
40 if (!empty($params['notify'])) {
41 $form_state['input']['notify'] = $params['notify'];
44 $form_state['rebuild'] = FALSE;
45 $form_state['programmed'] = TRUE;
46 $form_state['complete form'] = FALSE;
47 $form_state['method'] = 'post';
48 $form_state['build_info']['args'] = [];
50 * if we want to submit this form more than once in a process (e.g. create more than one user)
51 * we must force it to validate each time for this form. Otherwise it will not validate
52 * subsequent submissions and the manner in which the password is passed in will be invalid
54 $form_state['must_validate'] = TRUE;
55 $config = CRM_Core_Config
::singleton();
57 // we also need to redirect b
58 $config->inCiviCRM
= TRUE;
60 $form = backdrop_retrieve_form('user_register_form', $form_state);
61 $form_state['process_input'] = 1;
62 $form_state['submitted'] = 1;
63 $form['#array_parents'] = [];
64 $form['#tree'] = FALSE;
65 backdrop_process_form('user_register_form', $form, $form_state);
67 $config->inCiviCRM
= FALSE;
69 if (form_get_errors()) {
72 return $form_state['user']->uid
;
78 public function updateCMSName($ufID, $email) {
80 if (function_exists('user_load')) {
81 $user = user_load($ufID);
82 if ($user->mail
!= $email) {
90 * Check if username and email exists in the Backdrop db.
92 * @param array $params
93 * Array of name and mail values.
94 * @param array $errors
96 * @param string $emailName
97 * Field label for the 'email'.
99 public static function checkUserNameEmailExists(&$params, &$errors, $emailName = 'email') {
100 $errors = form_get_errors();
102 // unset Backdrop messages to avoid twice display of errors
103 unset($_SESSION['messages']);
106 if (!empty($params['name'])) {
107 if ($nameError = user_validate_name($params['name'])) {
108 $errors['cms_name'] = $nameError;
111 $uid = db_query("SELECT uid FROM {users} WHERE name = :name", [':name' => $params['name']])->fetchField();
113 $errors['cms_name'] = ts('The username %1 is already taken. Please select another username.', [1 => $params['name']]);
118 if (!empty($params['mail'])) {
119 if (!valid_email_address($params['mail'])) {
120 $errors[$emailName] = ts('The e-mail address %1 is not valid.', [1 => $params['mail']]);
123 $uid = db_query("SELECT uid FROM {users} WHERE mail = :mail", [':mail' => $params['mail']])->fetchField();
125 $resetUrl = url('user/password');
126 $errors[$emailName] = ts('The email address %1 already has an account associated with it. <a href="%2">Have you forgotten your password?</a>',
127 [1 => $params['mail'], 2 => $resetUrl]
137 public function getLoginURL($destination = '') {
138 $query = $destination ?
['destination' => $destination] : [];
139 return url('user/login', ['query' => $query, 'absolute' => TRUE]);
145 public function setTitle($title, $pageTitle = NULL) {
146 if (arg(0) == 'civicrm') {
151 backdrop_set_title($pageTitle, PASS_THROUGH
);
158 public function appendBreadCrumb($breadCrumbs) {
159 $breadCrumb = backdrop_get_breadcrumb();
161 if (is_array($breadCrumbs)) {
162 foreach ($breadCrumbs as $crumbs) {
163 if (stripos($crumbs['url'], 'id%%')) {
164 $args = ['cid', 'mid'];
165 foreach ($args as $a) {
166 $val = CRM_Utils_Request
::retrieve($a, 'Positive', CRM_Core_DAO
::$_nullObject,
170 $crumbs['url'] = str_ireplace("%%{$a}%%", $val, $crumbs['url']);
174 $breadCrumb[] = "<a href=\"{$crumbs['url']}\">{$crumbs['title']}</a>";
177 backdrop_set_breadcrumb($breadCrumb);
183 public function resetBreadCrumb() {
185 backdrop_set_breadcrumb($bc);
191 public function addHTMLHead($header) {
193 if (!empty($header)) {
194 $key = 'civi_' . ++
$count;
197 '#markup' => $header,
199 backdrop_add_html_head($data, $key);
206 public function addScriptUrl($url, $region) {
207 $params = ['group' => JS_LIBRARY
, 'weight' => 10];
211 $params['scope'] = substr($region, 5);
217 // If the path is within the Backdrop directory we can use the more efficient 'file' setting
218 $params['type'] = $this->formatResourceUrl($url) ?
'file' : 'external';
219 backdrop_add_js($url, $params);
226 public function addScript($code, $region) {
227 $params = ['type' => 'inline', 'group' => JS_LIBRARY
, 'weight' => 10];
231 $params['scope'] = substr($region, 5);
237 backdrop_add_js($code, $params);
244 public function addStyleUrl($url, $region) {
245 if ($region != 'html-header') {
249 // If the path is within the Backdrop directory we can use the more efficient 'file' setting
250 $params['type'] = $this->formatResourceUrl($url) ?
'file' : 'external';
251 backdrop_add_css($url, $params);
258 public function addStyle($code, $region) {
259 if ($region != 'html-header') {
262 $params = ['type' => 'inline'];
263 backdrop_add_css($code, $params);
270 public function mapConfigToSSL() {
272 $base_url = str_replace('http://', 'https://', $base_url);
276 * Get the name of the table that stores the user details.
280 protected function getUsersTableName() {
281 $userFrameworkUsersTableName = Civi
::settings()->get('userFrameworkUsersTableName');
282 if (empty($userFrameworkUsersTableName)) {
283 $userFrameworkUsersTableName = 'users';
285 return $userFrameworkUsersTableName;
291 public function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
292 $config = CRM_Core_Config
::singleton();
294 $ufDSN = CRM_Utils_SQL
::autoSwitchDSN($config->userFrameworkDSN
);
295 $dbBackdrop = DB
::connect($ufDSN);
296 if (DB
::isError($dbBackdrop)) {
297 throw new CRM_Core_Exception("Cannot connect to Backdrop database via $ufDSN, " . $dbBackdrop->getMessage());
300 $account = $userUid = $userMail = NULL;
301 if ($loadCMSBootstrap) {
302 $bootStrapParams = [];
303 if ($name && $password) {
309 CRM_Utils_System
::loadBootStrap($bootStrapParams, TRUE, TRUE, $realPath);
313 $userUid = $user->uid
;
314 $userMail = $user->mail
;
319 // SOAP cannot load Backdrop bootstrap and hence we do it the old way
320 // Contact CiviSMTP folks if we run into issues with this :)
321 $cmsPath = $this->cmsRootPath();
322 if (!defined('BACKDROP_ROOT')) {
323 define(BACKDROP_ROOT
, $cmsPath);
325 require_once "$cmsPath/core/includes/bootstrap.inc";
326 require_once "$cmsPath/core/includes/password.inc";
328 $strtolower = function_exists('mb_strtolower') ?
'mb_strtolower' : 'strtolower';
329 $name = $dbBackdrop->escapeSimple($strtolower($name));
330 $userFrameworkUsersTableName = $this->getUsersTableName();
332 // LOWER in query below roughly translates to 'hurt my database without deriving any benefit' See CRM-19811.
335 FROM {$userFrameworkUsersTableName} u
336 WHERE LOWER(u.name) = '$name'
340 $query = $dbBackdrop->query($sql);
341 $row = $query->fetchRow(DB_FETCHMODE_ASSOC
);
344 $fakeAccount = backdrop_anonymous_user();
345 $fakeAccount->name
= $name;
346 $fakeAccount->pass
= $row['pass'];
347 $passwordCheck = user_check_password($password, $fakeAccount);
348 if ($passwordCheck) {
349 $userUid = $row['uid'];
350 $userMail = $row['mail'];
355 if ($userUid && $userMail) {
356 CRM_Core_BAO_UFMatch
::synchronizeUFMatch($account, $userUid, $userMail, 'Backdrop');
357 $contactID = CRM_Core_BAO_UFMatch
::getContactId($userUid);
361 return [$contactID, $userUid, mt_rand()];
369 public function loadUser($username) {
372 $user = user_load_by_name($username);
374 if (empty($user->uid
)) {
379 $contact_id = CRM_Core_BAO_UFMatch
::getContactId($uid);
381 // lets store contact id and user id in session
382 $session = CRM_Core_Session
::singleton();
383 $session->set('ufID', $uid);
384 $session->set('userID', $contact_id);
389 * Perform any post login activities required by the UF -
390 * For Backdrop this could mean recording a watchdog message about the new
391 * session, saving the login timestamp, calling hook_user_login(), etc.
393 * @param array $params
394 * The array of form values submitted by the user.
396 public function userLoginFinalize($params = []) {
397 user_login_finalize($params);
403 public function isUserRegistrationPermitted() {
404 if (config_get('system.core', 'user_register') == 'admin_only') {
413 public function isPasswordUserGenerated() {
414 if (config_get('system.core', 'user_email_verification') == TRUE) {
423 public function getUFLocale() {
424 // return CiviCRM’s xx_YY locale that either matches Backdrop’s Chinese locale
425 // (for CRM-6281), Backdrop’s xx_YY or is retrieved based on Backdrop’s xx
426 // sometimes for CLI based on order called, this might not be set and/or empty
429 if (empty($language)) {
433 if ($language->langcode
== 'zh-hans') {
437 if ($language->langcode
== 'zh-hant') {
441 if (preg_match('/^.._..$/', $language->langcode
)) {
442 return $language->langcode
;
445 return CRM_Core_I18n_PseudoConstant
::longForShort(substr($language->langcode
, 0, 2));
451 public function setUFLocale($civicrm_language) {
454 $langcode = substr($civicrm_language, 0, 2);
455 $languages = language_list(FALSE, TRUE);
457 if (isset($languages[$langcode])) {
458 $language = $languages[$langcode];
460 // Config must be re-initialized to reset the base URL
461 // otherwise links will have the wrong language prefix/domain.
462 $config = CRM_Core_Config
::singleton();
472 * Determine the native ID of the CMS user.
474 * @param string $username
477 public function getUfId($username) {
478 $user = user_load_by_name($username);
479 if (empty($user->uid
)) {
488 public function logout() {
489 module_load_include('inc', 'user', 'user.pages');
494 * Get the default location for CiviCRM blocks.
498 public function getDefaultBlockLocation() {
499 return 'sidebar_first';
503 * Load Backdrop bootstrap.
505 * @param array $params
506 * Either uid, or name & pass.
507 * @param bool $loadUser
508 * Boolean Require CMS user load.
509 * @param bool $throwError
510 * If true, print error on failure and exit.
511 * @param bool|string $realPath path to script
515 public function loadBootStrap($params = [], $loadUser = TRUE, $throwError = TRUE, $realPath = NULL) {
516 $cmsPath = $this->cmsRootPath($realPath);
518 if (!file_exists("$cmsPath/core/includes/bootstrap.inc")) {
520 echo '<br />Sorry, could not locate bootstrap.inc\n';
525 // load Backdrop bootstrap
527 define('BACKDROP_ROOT', $cmsPath);
529 // For Backdrop multi-site CRM-11313
530 if ($realPath && strpos($realPath, 'sites/all/modules/') === FALSE) {
531 preg_match('@sites/([^/]*)/modules@s', $realPath, $matches);
532 if (!empty($matches[1])) {
533 $_SERVER['HTTP_HOST'] = $matches[1];
536 require_once "$cmsPath/core/includes/bootstrap.inc";
537 require_once "$cmsPath/core/includes/config.inc";
538 backdrop_bootstrap(BACKDROP_BOOTSTRAP_FULL
);
540 // Explicitly setting error reporting, since we cannot handle Backdrop
543 if (!function_exists('module_exists') ||
!module_exists('civicrm')) {
545 echo '<br />Sorry, could not load Backdrop bootstrap.';
551 // Backdrop successfully bootstrapped.
552 $config = CRM_Core_Config
::singleton();
554 // lets also fix the clean url setting
556 $config->cleanURL
= (int) config_get('system.core', 'clean_url');
558 // we need to call the config hook again, since we now know
559 // all the modules that are listening on it, does not apply
560 // to J! and WP as yet
562 CRM_Utils_Hook
::config($config);
568 $uid = $params['uid'] ??
NULL;
570 // Load the user we need to check Backdrop permissions.
571 $name = CRM_Utils_Array
::value('name', $params, FALSE) ?
$params['name'] : trim(CRM_Utils_Array
::value('name', $_REQUEST));
572 $pass = CRM_Utils_Array
::value('pass', $params, FALSE) ?
$params['pass'] : trim(CRM_Utils_Array
::value('pass', $_REQUEST));
575 $uid = user_authenticate($name, $pass);
578 echo '<br />Sorry, unrecognized username or password.';
587 $account = user_load($uid);
588 if ($account && $account->uid
) {
596 echo '<br />Sorry, can not load CMS user account.';
600 // CRM-6948: When using loadBootStrap, it's implicit that CiviCRM has already loaded its settings
601 // which means that define(CIVICRM_CLEANURL) was correctly set.
603 $config = CRM_Core_Config
::singleton();
604 $config->cleanURL
= (int) config_get('system.core', 'clean_url');
606 // CRM-8655: Backdrop wasn't available during bootstrap, so
607 // hook_civicrm_config() never executes.
608 CRM_Utils_Hook
::config($config);
616 public function cmsRootPath($scriptFilename = NULL) {
617 global $civicrm_paths;
618 if (!empty($civicrm_paths['cms.root']['path'])) {
619 return $civicrm_paths['cms.root']['path'];
625 if (!is_null($scriptFilename)) {
626 $path = $scriptFilename;
629 $path = $_SERVER['SCRIPT_FILENAME'];
633 $pathVars = explode('/',
634 str_replace('//', '/',
635 str_replace('\\', '/', $path)
639 // Keep the first directory name for later.
640 $firstVar = array_shift($pathVars);
642 // Remove script name to reduce one iteration.
643 array_pop($pathVars);
645 // CRM-7429 -- do check for uppermost 'includes' dir, which would
646 // work for multisite installation.
648 $cmsRoot = $firstVar . '/' . implode('/', $pathVars);
649 // Stop if we find backdrop signature file.
650 if (file_exists("$cmsRoot/core/misc/backdrop.js")) {
654 // Remove one directory level.
655 array_pop($pathVars);
656 } while (count($pathVars));
658 return ($valid) ?
$cmsRoot : NULL;
664 public function isUserLoggedIn() {
666 if (function_exists('user_is_logged_in')) {
667 $isloggedIn = user_is_logged_in();
676 public function getLoggedInUfID() {
678 if (function_exists('user_is_logged_in') &&
679 user_is_logged_in() &&
680 function_exists('user_uid_optional_to_arg')
682 $ufID = user_uid_optional_to_arg([]);
691 public function languageNegotiationURL($url, $addLanguagePart = TRUE, $removeLanguagePart = FALSE) {
696 if (function_exists('config_get') &&
697 module_exists('locale') &&
698 function_exists('language_negotiation_get')
702 // Check if language support from the URL (Path prefix or domain) is set.
703 if (language_negotiation_get('language') == 'locale-url') {
704 $urlType = config_get('locale.settings', 'locale_language_negotiation_url_part');
706 // URL prefix negotiation.
707 if ($urlType == LANGUAGE_NEGOTIATION_URL_PREFIX
) {
708 if (isset($language->prefix
) && $language->prefix
) {
709 if ($addLanguagePart) {
710 $url .= $language->prefix
. '/';
712 if ($removeLanguagePart) {
713 $url = str_replace("/{$language->prefix}/", '/', $url);
717 // Domain negotiation.
718 if ($urlType == LANGUAGE_NEGOTIATION_URL_DOMAIN
) {
719 if (isset($language->domain
) && $language->domain
) {
720 if ($addLanguagePart) {
721 $cleanedUrl = preg_replace('#^https?://#', '', $language->domain
);
722 // Backdrop function base_path() adds a "/" to the beginning and
723 // end of the returned path.
724 if (substr($cleanedUrl, -1) == '/') {
725 $cleanedUrl = substr($cleanedUrl, 0, -1);
727 $url = (CRM_Utils_System
::isSSL() ?
'https' : 'http') . '://' . $cleanedUrl . base_path();
729 if ($removeLanguagePart && defined('CIVICRM_UF_BASEURL')) {
730 $url = str_replace('\\', '/', $url);
731 $parseUrl = parse_url($url);
733 //kinda hackish but not sure how to do it right
734 //hope http_build_url() will help at some point.
735 if (is_array($parseUrl) && !empty($parseUrl)) {
736 $urlParts = explode('/', $url);
737 $hostKey = array_search($parseUrl['host'], $urlParts);
738 $ufUrlParts = parse_url(CIVICRM_UF_BASEURL
);
739 $urlParts[$hostKey] = $ufUrlParts['host'];
740 $url = implode('/', $urlParts);
752 * Find any users/roles/security-principals with the given permission
753 * and replace it with one or more permissions.
755 * @param string $oldPerm
756 * @param array $newPerms
759 public function replacePermission($oldPerm, $newPerms) {
760 $roles = user_roles(FALSE, $oldPerm);
761 if (!empty($roles)) {
762 foreach (array_keys($roles) as $rid) {
763 user_role_revoke_permissions($rid, [$oldPerm]);
764 user_role_grant_permissions($rid, $newPerms);
770 * Wrapper for og_membership creation.
777 public function og_membership_create($ogID, $userID) {
778 if (function_exists('og_entity_query_alter')) {
779 // sort-of-randomly chose a function that only exists in the // 7.x-2.x branch
781 // @TODO Find more solid way to check - try system_get_info('module', 'og').
783 // Also, since we don't know how to get the entity type of the // group, we'll assume it's 'node'
784 og_group('node', $ogID, ['entity' => user_load($userID)]);
787 // Works for the OG 7.x-1.x branch
788 og_group($ogID, ['entity' => user_load($userID)]);
793 * Wrapper for og_membership deletion.
800 public function og_membership_delete($ogID, $userID) {
801 if (function_exists('og_entity_query_alter')) {
802 // sort-of-randomly chose a function that only exists in the 7.x-2.x branch
803 // TODO: Find a more solid way to make this test
804 // Also, since we don't know how to get the entity type of the group, we'll assume it's 'node'
805 og_ungroup('node', $ogID, 'user', user_load($userID));
808 // Works for the OG 7.x-1.x branch
809 og_ungroup($ogID, 'user', user_load($userID));
816 public function getTimeZoneString() {
818 // Note that 0 is a valid timezone (GMT) so we use strlen not empty to check.
819 if (config_get('system.date', 'user_configurable_timezones') && $user->uid
&& isset($user->timezone
) && strlen($user->timezone
)) {
820 $timezone = $user->timezone
;
823 $timezone = config_get('system.date', 'default_timezone');
826 $timezone = parent
::getTimeZoneString();
834 public function setHttpHeader($name, $value) {
835 backdrop_add_http_header($name, $value);
841 public function synchronizeUsers() {
842 $config = CRM_Core_Config
::singleton();
843 if (PHP_SAPI
!= 'cli') {
850 $result = db_query("SELECT uid, mail, name FROM {users} where mail != ''");
852 $user = new StdClass();
853 $uf = $config->userFramework
;
856 $contactMatching = 0;
857 foreach ($result as $row) {
858 $user->$id = $row->$id;
859 $user->$mail = $row->$mail;
860 $user->$name = $row->$name;
862 if ($match = CRM_Core_BAO_UFMatch
::synchronizeUFMatch($user, $row->$id, $row->$mail, $uf, 1, 'Individual', TRUE)) {
871 'contactCount' => $contactCount,
872 'contactMatching' => $contactMatching,
873 'contactCreated' => $contactCreated,
880 public function clearResourceCache() {
881 _backdrop_flush_css_js();
885 * Get all the contact emails for users that have a specific permission.
887 * @param string $permissionName
888 * Name of the permission we are interested in.
891 * a comma separated list of email addresses
893 public function permissionEmails($permissionName) {
901 public function getDefaultFileStorage() {
902 $config = CRM_Core_Config
::singleton();
903 $baseURL = CRM_Utils_System
::languageNegotiationURL($config->userFrameworkBaseURL
, FALSE, TRUE);
905 $siteName = $this->parseBackdropSiteNameFromRequest('/files/civicrm');
907 $filesURL = $baseURL . "sites/$siteName/files/civicrm/";
910 $filesURL = $baseURL . "files/civicrm/";
915 'path' => CRM_Utils_File
::baseFilePath(),
920 * Check if a resource url is within the Backdrop directory and format appropriately.
922 * @param $url (reference)
925 * TRUE for internal paths, FALSE for external. The backdrop_add_js fn is able to add js more
926 * efficiently if it is known to be in the Backdrop site
928 public function formatResourceUrl(&$url) {
930 $base = CRM_Core_Config
::singleton()->resourceBase
;
932 // Handle absolute urls
933 // compares $url (which is some unknown/untrusted value from a third-party dev) to the CMS's base url (which is independent of civi's url)
934 // to see if the url is within our Backdrop dir, if it is we are able to treated it as an internal url
935 if (strpos($url, $base_url) === 0) {
936 $file = trim(str_replace($base_url, '', $url), '/');
937 // CRM-18130: Custom CSS URL not working if aliased or rewritten
938 if (file_exists(BACKDROP_ROOT
. $file)) {
943 // Handle relative urls that are within the CiviCRM module directory
944 elseif (strpos($url, $base) === 0) {
946 $url = $this->appendCoreDirectoryToResourceBase(dirname(backdrop_get_path('module', 'civicrm')) . '/') . trim(substr($url, strlen($base)), '/');
948 // Strip query string
949 $q = strpos($url, '?');
950 if ($q && $internal) {
951 $url = substr($url, 0, $q);
959 public function setMessage($message) {
960 backdrop_set_message($message);
966 public function permissionDenied() {
967 backdrop_access_denied();
973 public function flush() {
974 backdrop_flush_all_caches();
978 * Determine if Backdrop multi-site applies to the current request -- and,
979 * specifically, determine the name of the multisite folder.
981 * @param string $flagFile
982 * Check if $flagFile exists inside the site dir.
983 * @return null|string
984 * string, e.g. `bar.example.com` if using multisite.
985 * NULL if using the default site.
987 private function parseBackdropSiteNameFromRequest($flagFile = '') {
988 $phpSelf = array_key_exists('PHP_SELF', $_SERVER) ?
$_SERVER['PHP_SELF'] : '';
989 $httpHost = array_key_exists('HTTP_HOST', $_SERVER) ?
$_SERVER['HTTP_HOST'] : '';
990 if (empty($httpHost)) {
991 $httpHost = parse_url(CIVICRM_UF_BASEURL
, PHP_URL_HOST
);
992 if (parse_url(CIVICRM_UF_BASEURL
, PHP_URL_PORT
)) {
993 $httpHost .= ':' . parse_url(CIVICRM_UF_BASEURL
, PHP_URL_PORT
);
997 $confdir = $this->cmsRootPath() . '/sites';
999 if (file_exists($confdir . "/sites.php")) {
1000 include $confdir . "/sites.php";
1006 $uri = explode('/', $phpSelf);
1007 $server = explode('.', implode('.', array_reverse(explode(':', rtrim($httpHost, '.')))));
1008 for ($i = count($uri) - 1; $i > 0; $i--) {
1009 for ($j = count($server); $j > 0; $j--) {
1010 $dir = implode('.', array_slice($server, -$j)) . implode('.', array_slice($uri, 0, $i));
1011 if (file_exists("$confdir/$dir" . $flagFile)) {
1012 \Civi
::$statics[__CLASS__
]['drupalSiteName'] = $dir;
1013 return \Civi
::$statics[__CLASS__
]['drupalSiteName'];
1016 if (isset($sites[$dir]) && file_exists("$confdir/{$sites[$dir]}" . $flagFile)) {
1017 \Civi
::$statics[__CLASS__
]['drupalSiteName'] = $sites[$dir];
1018 return \Civi
::$statics[__CLASS__
]['drupalSiteName'];
1025 * Append Backdrop CSS and JS to coreResourcesList.
1027 * @param \Civi\Core\Event\GenericHookEvent $e
1029 public function appendCoreResources(\Civi\Core\Event\GenericHookEvent
$e) {
1030 $e->list[] = 'css/backdrop.css';
1031 $e->list[] = 'js/crm.backdrop.js';