Skip to content

Commit

Permalink
fix(deprecated,upgrade): Merge pull request #2 from ynorth-projects/R…
Browse files Browse the repository at this point in the history
…GTC-1875

[RGTC-1875] Replace drupal_get_path
  • Loading branch information
podarok authored Jan 5, 2022
2 parents 45f5157 + 0fe6c16 commit 0f4d053
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions openy_node_session.install
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Update Session for rabbit hole, hiding pages from anonymous users.
*/
function openy_node_session_update_8001() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';
// Import new configuration.
$config_importer = \Drupal::service('openy_upgrade_tool.importer');
$config_importer->setDirectory($config_dir);
Expand All @@ -36,7 +36,7 @@ function openy_node_session_update_8001() {
* Update description for field.
*/
function openy_node_session_update_8002() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';
// Update multiple configurations.
$configs = [
'field.field.node.session.field_session_class' => [
Expand Down Expand Up @@ -93,7 +93,7 @@ function openy_node_session_update_8002() {
* Update description for fields.
*/
function openy_node_session_update_8003() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';
// Update multiple configurations.
$configs = [
'field.field.paragraph.session_time.field_session_time_date' => [
Expand All @@ -117,7 +117,7 @@ function openy_node_session_update_8003() {
* Update Open Y session node feature configs.
*/
function openy_node_session_update_8004() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';
// Update multiple configurations.
$configs = [
'field.field.node.session.field_session_exclusions' => [
Expand All @@ -144,7 +144,7 @@ function openy_node_session_update_8006() {
* Update feature configs after entity reference handler update and configs actualization.
*/
function _openy_node_session_update_8007() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';
// Update multiple configurations.
$configs = [
'field.field.node.session.field_session_class' => [
Expand Down Expand Up @@ -173,7 +173,7 @@ function _openy_node_session_update_8007() {
* Add room and instructor fields.
*/
function _openy_node_session_update_8008() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';

// Add two new fields.
$config_importer = \Drupal::service('openy_upgrade_tool.importer');
Expand Down Expand Up @@ -218,7 +218,7 @@ function openy_node_session_update_8009() {
* Update to get fields from prgreg.
*/
function openy_node_session_update_8010() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';

// Add two new fields.
$config_importer = \Drupal::service('openy_upgrade_tool.importer');
Expand Down Expand Up @@ -247,7 +247,7 @@ function openy_node_session_update_8010() {
* Add new field_activity_type.
*/
function openy_node_session_update_8012() {
$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';

// Add two new fields.
$config_importer = \Drupal::service('openy_upgrade_tool.importer');
Expand All @@ -265,7 +265,7 @@ function openy_node_session_update_8012() {
*/
function openy_node_session_update_8013() {

$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';

$config_importer = \Drupal::service('openy_upgrade_tool.importer');
$config_importer->setDirectory($config_dir);
Expand Down Expand Up @@ -298,7 +298,7 @@ function openy_node_session_update_8013() {
*/
function openy_node_session_update_8014() {

$config_dir = drupal_get_path('module', 'openy_node_session') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_node_session') . '/config/install/';

$config_importer = \Drupal::service('openy_upgrade_tool.importer');
$config_importer->setDirectory($config_dir);
Expand Down

0 comments on commit 0f4d053

Please sign in to comment.