Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

Commit

Permalink
[SDPAP-8093] Removed migrate cron module. (#29)
Browse files Browse the repository at this point in the history
* [SDPAP-8093] Removed migrate cron module.
  • Loading branch information
MdNadimHossain authored Aug 15, 2023
1 parent 203f9f3 commit f295045
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ This module defines all the fields, paragraph types and block types used in Gran
* [Tide Core](https://github.com/dpc-sdp/tide_core)
* [Tide Media](https://github.com/dpc-sdp/tide_media)
* [Tide Webform](https://github.com/dpc-sdp/tide_webform)
* [Migrate Cron](https://www.drupal.org/project/migrate_cron)
* [Migrate Plus](https://www.drupal.org/project/migrate_plus)
* [Migrate Tools](https://www.drupal.org/project/migrate_tools)
* [Range](https://www.drupal.org/project/range)
Expand Down
3 changes: 0 additions & 3 deletions config/install/node.type.grant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ status: true
dependencies:
module:
- menu_ui
- wysiwyg_template
third_party_settings:
menu_ui:
available_menus:
- main
parent: 'main:'
wysiwyg_template:
default_template: ''
name: Grant
type: grant
description: 'Use Grant content type for grant content.'
Expand Down
2 changes: 0 additions & 2 deletions config/optional/migrate_cron.settings.yml

This file was deleted.

2 changes: 0 additions & 2 deletions tide_grant.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies:
- dpc-sdp:tide_webform
- drupal:datetime_range
- drupal:menu_ui
- drupal:migrate_cron
- drupal:migrate_plus
- drupal:migrate_tools
- drupal:range
Expand Down Expand Up @@ -61,7 +60,6 @@ config_devel:
- field.storage.node.field_node_on_going
- field.storage.node.field_node_phone
- field.storage.node.field_overview_title
- migrate_cron.settings
- migrate_plus.migration_group.default
- tide_grant.settings
- webform.webform.tide_grant_submission
Expand Down
19 changes: 18 additions & 1 deletion tide_grant.install
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ use Drupal\Component\Utility\Random;
use Drupal\Core\Entity\Entity\EntityFormDisplay;
use Drupal\Core\Session\AccountInterface;
use Drupal\field\Entity\FieldConfig;
use Drupal\node\Entity\Node;
use Drupal\user\Entity\Role;
use Drupal\user\Entity\User;
use Drupal\workflows\Entity\Workflow;
use Drupal\node\Entity\Node;

/**
* Implements hook_install().
Expand Down Expand Up @@ -716,3 +716,20 @@ function tide_grant_update_8016() {
$display_config->save();
}
}

/**
* Remove deprecated modules before d10 upgrade.
*/
function tide_grant_update_8017() {
// Check if module is both installed and enabled.
if (\Drupal::moduleHandler()->moduleExists('migrate_cron')) {
// If exists, uninstall module.
\Drupal::service('module_installer')->uninstall(['migrate_cron']);
}
$config_factory = \Drupal::configFactory();
// Delete the related config.
$config = $config_factory->getEditable('migrate_cron.settings.yml');
if ($config) {
$config->delete();
}
}
4 changes: 2 additions & 2 deletions tide_grant.module
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Tide Grant module functionality.
*/

use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\node\Entity\Node;
use Drupal\Component\Utility\UrlHelper;
use Drupal\node\NodeInterface;

/**
Expand Down Expand Up @@ -262,7 +262,7 @@ function tide_grant_node_insert(NodeInterface $node) {
$node->save();
}
if (\Drupal::moduleHandler()->moduleExists('simple_sitemap')) {
$generator = \Drupal::service('simple_sitemap.generator');
$generator = \Drupal::service('simple_sitemap.entity_manager');
$settings = [
'index' => FALSE,
'priority' => 0.5,
Expand Down

0 comments on commit f295045

Please sign in to comment.