CRM-17352 - Use CiviCRM to load scripts for consistency
authorColeman Watts <coleman@civicrm.org>
Thu, 11 Jan 2018 15:53:52 +0000 (10:53 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 11 Jan 2018 15:53:52 +0000 (10:53 -0500)
CRM/Utils/System/Drupal8.php

index 6589b2e41ddd4179d0a2edb20c5716bf2fab8449..6b0d2eaab2e60da5ff2910be7ae9151082b1e456 100644 (file)
@@ -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
    */