From: Coleman Watts Date: Thu, 11 Jan 2018 15:53:52 +0000 (-0500) Subject: CRM-17352 - Use CiviCRM to load scripts for consistency X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=670a34bae355f9e30c606cb82879d8e5370822f1;p=civicrm-core.git CRM-17352 - Use CiviCRM to load scripts for consistency --- diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index 6589b2e41d..6b0d2eaab2 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -207,52 +207,6 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { \Drupal::service('civicrm.page_state')->addHtmlHeader($header); } - /** - * @inheritDoc - */ - public function addScriptUrl($url, $region) { - static $weight = 0; - - switch ($region) { - case 'html-header': - break; - - default: - return FALSE; - } - - $script = array( - '#tag' => 'script', - '#attributes' => array( - 'src' => $url, - ), - '#weight' => $weight, - ); - $weight++; - \Drupal::service('civicrm.page_state')->addJS($script); - return TRUE; - } - - /** - * @inheritDoc - */ - public function addScript($code, $region) { - switch ($region) { - case 'html-header': - break; - - default: - return FALSE; - } - - $script = array( - '#tag' => 'script', - '#value' => $code, - ); - \Drupal::service('civicrm.page_state')->addJS($script); - return TRUE; - } - /** * @inheritDoc */