Skip to content

Commit

Permalink
Merge pull request #37 from ASUWebPlatforms/WS2-1334
Browse files Browse the repository at this point in the history
fix deprecations via rector
  • Loading branch information
mlsamuelson authored Oct 31, 2022
2 parents b8c37fb + 209db2f commit 86d9c87
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Plugin/CKEditorPlugin/WebsparkAdvancedImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/CKEditorPlugin/WebsparkBlockquote.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand All @@ -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 '),
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/CKEditorPlugin/WebsparkButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand All @@ -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 '),
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/CKEditorPlugin/WebsparkDivider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand All @@ -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'),
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/CKEditorPlugin/WebsparkHighlightedHeading.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand All @@ -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 '),
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/CKEditorPlugin/WebsparkLead.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand All @@ -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 '),
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/CKEditorPlugin/WebsparkListStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/CKEditorPlugin/WebsparkMediaAlter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/CKEditorPlugin/WebsparkTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand All @@ -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'),
Expand Down

0 comments on commit 86d9c87

Please sign in to comment.