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

Commit

Permalink
Merge pull request #164 from ymcatwincities/backportyn
Browse files Browse the repository at this point in the history
fix: backport deprecated fixes …
  • Loading branch information
podarok authored Apr 26, 2022
2 parents 354534d + 776d3bc commit 6432e3e
Show file tree
Hide file tree
Showing 24 changed files with 2,200 additions and 6,824 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
function openy_paragraph_activity_finder_search_update_8002() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_paragraph_activity_finder_search') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_paragraph_activity_finder_search') . '/config/install');
$cim->importConfigs([
'field.field.paragraph.activity_finder_search.field_prgf_af_page_ref',
'core.entity_view_display.paragraph.activity_finder_search.default',
Expand All @@ -23,7 +23,7 @@ function openy_paragraph_activity_finder_search_update_8002() {
*/
function openy_paragraph_activity_finder_search_update_8003() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_paragraph_activity_finder_search') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_paragraph_activity_finder_search') . '/config/install');
$cim->importConfigs([
'field.field.paragraph.activity_finder_search.field_prgf_af_show_weeks_filter',
'field.storage.paragraph.field_prgf_af_show_weeks_filter',
Expand All @@ -36,7 +36,7 @@ function openy_paragraph_activity_finder_search_update_8003() {
* Update configs with deprecation notices.
*/
function openy_paragraph_activity_finder_search_update_8004() {
$config_dir = drupal_get_path('module', 'openy_paragraph_activity_finder_search') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_paragraph_activity_finder_search') . '/config/install/';
$configs = [
'paragraphs.paragraphs_type.activity_finder_search' => [
'label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
function openy_prgf_activity_finder_update_8001() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_prgf_activity_finder') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_prgf_activity_finder') . '/config/install');
$cim->importConfigs([
'field.storage.paragraph.field_prgf_af_categ_excl',
'field.storage.paragraph.field_prgf_af_categ',
Expand All @@ -27,7 +27,7 @@ function openy_prgf_activity_finder_update_8001() {
*/
function openy_prgf_activity_finder_update_8002() {
$cim = \Drupal::service('openy_upgrade_tool.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_prgf_activity_finder') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_prgf_activity_finder') . '/config/install');
$cim->importConfigs([
'field.storage.paragraph.field_prgf_hide_program_block',
'field.field.paragraph.activity_finder.field_prgf_hide_program_block',
Expand All @@ -41,7 +41,7 @@ function openy_prgf_activity_finder_update_8002() {
*/
function openy_prgf_activity_finder_update_8003() {
$cim = \Drupal::service('openy_upgrade_tool.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_prgf_activity_finder') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_prgf_activity_finder') . '/config/install');
$cim->importConfigs([
'core.entity_form_display.paragraph.activity_finder.default',
'core.entity_view_display.paragraph.activity_finder.default',
Expand All @@ -54,7 +54,7 @@ function openy_prgf_activity_finder_update_8003() {
* Update configs with deprecation notices.
*/
function openy_prgf_activity_finder_update_8004() {
$config_dir = drupal_get_path('module', 'openy_prgf_activity_finder') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_prgf_activity_finder') . '/config/install/';
$configs = [
'paragraphs.paragraphs_type.activity_finder' => [
'label',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Update configs with new labels/descriptions.
*/
function openy_prgf_activity_finder_4_update_8400() {
$config_dir = drupal_get_path('module', 'openy_prgf_activity_finder_4') . '/config/install/';
$config_dir = \Drupal::service('extension.list.module')->getPath('openy_prgf_activity_finder_4') . '/config/install/';
$configs = [
'paragraphs.paragraphs_type.activity_finder_4' => [
'label',
Expand Down
7 changes: 7 additions & 0 deletions openy_activity_finder.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,10 @@ function hook_activity_finder_program_process_results_alter(array &$data, NodeIn
function hook_activity_finder_program_more_info_alter(&$data) {

}

/**
* Alter location list.
*/
function hook_activity_finder_location_list_alter(array &$data) {

}
18 changes: 9 additions & 9 deletions openy_activity_finder.install
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function openy_activity_finder_update_dependencies() {
* Update configs.
*/
function openy_activity_finder_update_8001() {
$openy_activity_finder_dir = drupal_get_path('module', 'openy_activity_finder');
$openy_activity_finder_dir = \Drupal::service('extension.list.module')->getPath('openy_activity_finder');
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory($openy_activity_finder_dir . '/config/install');
$cim->importConfigs(['openy_activity_finder.settings']);
Expand All @@ -63,7 +63,7 @@ function openy_activity_finder_update_8001() {
*/
function openy_activity_finder_update_8002() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/optional');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/optional');
$config = \Drupal::config('search_api.index.default');
if (!$config->isNew()) {
// Import config only in case it already exist.
Expand All @@ -77,7 +77,7 @@ function openy_activity_finder_update_8002() {
function openy_activity_finder_update_8003() {
\Drupal::service('module_installer')->install(['openy']);
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/install');
$cim->importConfigs(['openy_activity_finder.settings']);
}

Expand All @@ -96,7 +96,7 @@ function openy_activity_finder_update_8004(&$sandbox) {
*/
function openy_activity_finder_update_8005() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/optional');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/optional');
$config = \Drupal::config('search_api.index.default');
if (!$config->isNew()) {
// Import config only in case it already exist.
Expand Down Expand Up @@ -152,7 +152,7 @@ function openy_activity_finder_update_8007(&$sandbox) {
*/
function openy_activity_finder_update_8008() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/optional');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/optional');
$config = \Drupal::config('search_api.index.default');
if (!$config->isNew()) {
// Import config only in case it already exist.
Expand All @@ -165,7 +165,7 @@ function openy_activity_finder_update_8008() {
*/
function openy_activity_finder_update_8009() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/optional');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/optional');
$config = \Drupal::config('search_api.index.default');
if (!$config->isNew()) {
// Import config only in case it already exist.
Expand All @@ -179,7 +179,7 @@ function openy_activity_finder_update_8009() {
function openy_activity_finder_update_8400() {
// Import config for rest endpoint.
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/install');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/install');
$cim->importConfigs(['rest.resource.openy_activity_finder_session_data']);
// Add permissions to anonymous and authenticated roles.
$permissions = [
Expand All @@ -202,7 +202,7 @@ function openy_activity_finder_update_8400() {
*/
function openy_activity_finder_update_8401() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/optional');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/optional');
$config = \Drupal::config('search_api.index.default');
if (!$config->isNew()) {
// Import config only in case it already exists.
Expand All @@ -225,7 +225,7 @@ function openy_activity_finder_update_8402() {
*/
function openy_activity_finder_update_8403() {
$cim = \Drupal::service('config_import.importer');
$cim->setDirectory(drupal_get_path('module', 'openy_activity_finder') . '/config/optional');
$cim->setDirectory(\Drupal::service('extension.list.module')->getPath('openy_activity_finder') . '/config/optional');
$config = \Drupal::config('search_api.index.default');
if (!$config->isNew()) {
// Import config only in case it already exists.
Expand Down
2 changes: 1 addition & 1 deletion openy_activity_finder.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ openy_activity_finder_search:
- core/jquery.cookie

activity_finder_4:
version: 4.0.13
version: 4.0.15
js:
openy_af4_vue_app/dist/activity_finder_4.umd.min.js: { minified: true }
css:
Expand Down
2 changes: 1 addition & 1 deletion openy_af4_vue_app/dist/activity_finder_4.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion openy_af4_vue_app/dist/activity_finder_4.umd.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 6432e3e

Please sign in to comment.