Commit e6f0b398 authored by Project Update Bot's avatar Project Update Bot Committed by Jonathan Smith
Browse files

Issue #3289475 by Project Update Bot, jonathan1055: Replace drupal_get_path()...

Issue #3289475 by Project Update Bot, jonathan1055: Replace drupal_get_path() - automated Drupal 10 compatibility
parent 6d0ed4b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ $plugin = [
  'edit form' => 'scheduler_form_pane_node_form_menu_content_type_edit_form',
  'render callback' => 'scheduler_form_pane_content_type_render',
  'title' => t('Node form scheduler'),
  'icon' => drupal_get_path('module', 'ctools') . '/plugins/content_types/node_form/icon_node_form.png',
  'icon' => \Drupal::service('extension.list.module')->getPath('ctools') . '/plugins/content_types/node_form/icon_node_form.png',
  'description' => t('Scheduler date options on the Node form.'),
  'required context' => new ctools_context_required(t('Form'), 'node_form'),
  'category' => t('Form'),
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ function scheduler_help($route_name, RouteMatchInterface $route_match) {
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Scheduler module provides the functionality for automatic publishing and unpublishing of entities, such and nodes and media items, at specified future dates.') . '</p>';
      $output .= '<p>' . t('You can read more in the <a href="@readme">readme</a> file or our <a href="@project">project page on Drupal.org</a>.', [
        '@readme' => $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'scheduler') . '/README.md',
        '@readme' => $GLOBALS['base_url'] . '/' . \Drupal::service('extension.list.module')->getPath('scheduler') . '/README.md',
        '@project' => 'https://drupal.org/project/scheduler',
      ]) . '</p>';
      break;
+2 −2
Original line number Diff line number Diff line
@@ -1199,10 +1199,10 @@ class SchedulerManager {

      // Read the view definition from the .yml file. First try the /optional
      // folder, then the main /config folder.
      $optional_folder = drupal_get_path('module', 'scheduler') . '/config/optional';
      $optional_folder = \Drupal::service('extension.list.module')->getPath('scheduler') . '/config/optional';
      $source_storage = new FileStorage($optional_folder);
      if (!$source = $source_storage->read($full_name)) {
        $install_folder = drupal_get_path('module', 'scheduler') . '/config/install';
        $install_folder = \Drupal::service('extension.list.module')->getPath('scheduler') . '/config/install';
        $source_storage = new FileStorage($install_folder);
        if (!$source = $source_storage->read($full_name)) {
          $this->logger->notice('No source file for %full_name in either %install_folder or %optional_folder folders',
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class MigrateSchedulerNodeTypeConfigTest extends MigrateDrupal7TestBase {
    parent::setUp();
    $this->loadFixture(implode(DIRECTORY_SEPARATOR, [
      DRUPAL_ROOT,
      drupal_get_path('module', 'scheduler'),
      \Drupal::service('extension.list.module')->getPath('scheduler'),
      'tests',
      'fixtures',
      'node_type_config.php',
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ class MigrateSchedulerTest extends MigrateDrupal7TestBase {
    parent::setUp();
    $this->loadFixture(implode(DIRECTORY_SEPARATOR, [
      DRUPAL_ROOT,
      drupal_get_path('module', 'scheduler'),
      \Drupal::service('extension.list.module')->getPath('scheduler'),
      'tests',
      'fixtures',
      'drupal7.php',