From 209db2f1c992fd37b984a77c9c3b2c38e8749ae8 Mon Sep 17 00:00:00 2001 From: Travis Butterfield Date: Mon, 24 Oct 2022 13:51:09 -0700 Subject: [PATCH] fix deprecations via rector --- src/Plugin/CKEditorPlugin/WebsparkAdvancedImage.php | 2 +- src/Plugin/CKEditorPlugin/WebsparkBlockquote.php | 4 ++-- src/Plugin/CKEditorPlugin/WebsparkButton.php | 4 ++-- src/Plugin/CKEditorPlugin/WebsparkDivider.php | 4 ++-- src/Plugin/CKEditorPlugin/WebsparkHighlightedHeading.php | 4 ++-- src/Plugin/CKEditorPlugin/WebsparkLead.php | 4 ++-- src/Plugin/CKEditorPlugin/WebsparkListStyle.php | 2 +- src/Plugin/CKEditorPlugin/WebsparkMediaAlter.php | 2 +- src/Plugin/CKEditorPlugin/WebsparkTable.php | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Plugin/CKEditorPlugin/WebsparkAdvancedImage.php b/src/Plugin/CKEditorPlugin/WebsparkAdvancedImage.php index 9eead87..27dbef7 100644 --- a/src/Plugin/CKEditorPlugin/WebsparkAdvancedImage.php +++ b/src/Plugin/CKEditorPlugin/WebsparkAdvancedImage.php @@ -45,7 +45,7 @@ public function getLibraries(Editor $editor) { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/' . $this->getPluginId() . '/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/' . $this->getPluginId() . '/plugin.js'; } /** diff --git a/src/Plugin/CKEditorPlugin/WebsparkBlockquote.php b/src/Plugin/CKEditorPlugin/WebsparkBlockquote.php index 8f2dc0d..08c05ca 100755 --- a/src/Plugin/CKEditorPlugin/WebsparkBlockquote.php +++ b/src/Plugin/CKEditorPlugin/WebsparkBlockquote.php @@ -20,7 +20,7 @@ class WebsparkBlockquote extends CKEditorPluginBase { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkblockquote/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkblockquote/plugin.js'; } /** @@ -41,7 +41,7 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkblockquote'; + $path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkblockquote'; return [ 'WebsparkBlockquote' => [ 'label' => t('ASU Web Standards Blockquote '), diff --git a/src/Plugin/CKEditorPlugin/WebsparkButton.php b/src/Plugin/CKEditorPlugin/WebsparkButton.php index 6b57ed0..7d70072 100755 --- a/src/Plugin/CKEditorPlugin/WebsparkButton.php +++ b/src/Plugin/CKEditorPlugin/WebsparkButton.php @@ -20,7 +20,7 @@ class WebsparkButton extends CKEditorPluginBase { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkbutton/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkbutton/plugin.js'; } /** @@ -41,7 +41,7 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkbutton'; + $path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkbutton'; return [ 'WebsparkButton' => [ 'label' => t('ASU Web Standards Button '), diff --git a/src/Plugin/CKEditorPlugin/WebsparkDivider.php b/src/Plugin/CKEditorPlugin/WebsparkDivider.php index 19f3a7f..4b277fd 100644 --- a/src/Plugin/CKEditorPlugin/WebsparkDivider.php +++ b/src/Plugin/CKEditorPlugin/WebsparkDivider.php @@ -20,7 +20,7 @@ class WebsparkDivider extends CKEditorPluginBase { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkdivider/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkdivider/plugin.js'; } /** @@ -41,7 +41,7 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkdivider'; + $path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkdivider'; return [ 'WebsparkDivider' => [ 'label' => t('Divider'), diff --git a/src/Plugin/CKEditorPlugin/WebsparkHighlightedHeading.php b/src/Plugin/CKEditorPlugin/WebsparkHighlightedHeading.php index 3d2be03..c76fa85 100644 --- a/src/Plugin/CKEditorPlugin/WebsparkHighlightedHeading.php +++ b/src/Plugin/CKEditorPlugin/WebsparkHighlightedHeading.php @@ -20,7 +20,7 @@ class WebsparkHighlightedHeading extends CKEditorPluginBase { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkhighlightedheading/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkhighlightedheading/plugin.js'; } /** @@ -41,7 +41,7 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkhighlightedheading'; + $path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkhighlightedheading'; return [ 'WebsparkHighlightedHeading' => [ 'label' => t('ASU Web Standards Higlighted Heading '), diff --git a/src/Plugin/CKEditorPlugin/WebsparkLead.php b/src/Plugin/CKEditorPlugin/WebsparkLead.php index 3c47e60..7688322 100755 --- a/src/Plugin/CKEditorPlugin/WebsparkLead.php +++ b/src/Plugin/CKEditorPlugin/WebsparkLead.php @@ -20,7 +20,7 @@ class WebsparkLead extends CKEditorPluginBase { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparklead/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparklead/plugin.js'; } /** @@ -41,7 +41,7 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparklead'; + $path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparklead'; return [ 'WebsparkLead' => [ 'label' => t('ASU Web Standards Lead '), diff --git a/src/Plugin/CKEditorPlugin/WebsparkListStyle.php b/src/Plugin/CKEditorPlugin/WebsparkListStyle.php index c6e6435..f08ce01 100644 --- a/src/Plugin/CKEditorPlugin/WebsparkListStyle.php +++ b/src/Plugin/CKEditorPlugin/WebsparkListStyle.php @@ -72,7 +72,7 @@ public function getFile() { $plugin = FALSE; // Get plugin path. - $plugin_path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparkliststyle/plugin.js'; + $plugin_path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparkliststyle/plugin.js'; if (file_exists(DRUPAL_ROOT . '/' . $plugin_path)) { $plugin = $plugin_path; diff --git a/src/Plugin/CKEditorPlugin/WebsparkMediaAlter.php b/src/Plugin/CKEditorPlugin/WebsparkMediaAlter.php index 4212eed..426d9c8 100644 --- a/src/Plugin/CKEditorPlugin/WebsparkMediaAlter.php +++ b/src/Plugin/CKEditorPlugin/WebsparkMediaAlter.php @@ -45,7 +45,7 @@ public function getLibraries(Editor $editor) { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/' . $this->getPluginId() . '/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/' . $this->getPluginId() . '/plugin.js'; } /** diff --git a/src/Plugin/CKEditorPlugin/WebsparkTable.php b/src/Plugin/CKEditorPlugin/WebsparkTable.php index c4373e3..842b9a1 100644 --- a/src/Plugin/CKEditorPlugin/WebsparkTable.php +++ b/src/Plugin/CKEditorPlugin/WebsparkTable.php @@ -20,7 +20,7 @@ class WebsparkTable extends CKEditorPluginBase { * {@inheritdoc} */ public function getFile() { - return drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparktable/plugin.js'; + return \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparktable/plugin.js'; } /** @@ -34,7 +34,7 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { - $path = drupal_get_path('module', 'webspark_ckeditor_plugins') . '/js/plugins/websparktable'; + $path = \Drupal::service('extension.list.module')->getPath('webspark_ckeditor_plugins') . '/js/plugins/websparktable'; return [ 'WebsparkTable' => [ 'label' => t('Webspark table plugin'),