Skip to content

Commit

Permalink
Merge pull request #464 from City-of-Helsinki/update-configuration
Browse files Browse the repository at this point in the history
Automatic update
  • Loading branch information
khalima authored Oct 25, 2023
2 parents 954707c + 9c6bc32 commit f5d662f
Show file tree
Hide file tree
Showing 9 changed files with 385 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .platform/schema
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2
3
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"drupal/coder": "^8.3",
"drupal/core-dev": "^9.1",
"jangregor/phpstan-prophecy": "^1.0",
"mglaman/phpstan-drupal": "^1.2",
"phpspec/prophecy-phpunit": "^2",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpunit/phpunit": "^9.6",
"weitzman/drupal-test-traits": "^2.1"
},
Expand All @@ -49,7 +54,8 @@
"composer/installers": true,
"cweagans/composer-patches": true,
"drupal/core-composer-scaffold": true,
"php-http/discovery": false
"php-http/discovery": false,
"phpstan/extension-installer": true
},
"audit": {
"abandoned": "report"
Expand Down
403 changes: 364 additions & 39 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ hidden:
services: true
show_www: true
streetview_entrance_url: true
toc_enabled: true
topical: true
unit_picture_caption: true
www: true
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,6 @@ hidden:
search_api_excerpt: true
show_www: true
streetview_entrance_url: true
toc_enabled: true
topical: true
unit_picture_caption: true
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,6 @@ hidden:
search_api_excerpt: true
show_www: true
streetview_entrance_url: true
toc_enabled: true
topical: true
unit_picture_caption: true
3 changes: 0 additions & 3 deletions conf/cmi/user.role.admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ permissions:
- 'administer eu cookie compliance popup'
- 'administer group'
- 'administer group content menu types'
- 'administer hotjar settings'
- 'administer menu'
- 'administer nodes'
- 'administer paragraphs library'
Expand Down Expand Up @@ -225,8 +224,6 @@ permissions:
- 'update own tpr_ontology_word_details'
- 'update own tpr_service'
- 'update own tpr_unit'
- 'update tpr_service'
- 'update tpr_unit'
- 'use menu link attributes'
- 'use text format full_html'
- 'use text format minimal'
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/views.view.service_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,13 @@ display:
display_plugin: block
position: 1
display_options:
display_extenders: { }
pager:
type: none
options:
offset: 0
defaults:
pager: false
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
Expand Down
11 changes: 9 additions & 2 deletions public/modules/custom/helfi_group/helfi_group.module
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,11 @@ function helfi_group_form_node_form_alter(

if ($form['menu']) {
$menu_parent = $form['menu']['link']['menu_parent']['#default_value'];
$menu_name = explode(':', $menu_parent)[0];
if (!$menu_parent) {
return;
}

$menu_name = explode(':', $menu_parent)[0];
if (!str_contains($menu_name, 'group')) {
return;
}
Expand Down Expand Up @@ -235,7 +238,7 @@ function helfi_group_form_node_form_alter(
$menu_link_content = $menu_link_content->getTranslation($current_language);
$status = $menu_link_content->get('content_translation_status')->value;
$form['menu']['content_translation_status']['#default_value'] = $status;
$form["menu"]["content_translation_status"]["#description"] = t('Tämä arvo muuttuu automaattisesti tallentaessa sisällön julkaisutilan mukaan.');
$form['menu']['content_translation_status']['#description'] = 'Tämä arvo muuttuu automaattisesti tallentaessa sisällön julkaisutilan mukaan.';
}

}
Expand All @@ -255,7 +258,11 @@ function helfi_group_menuitem_set_content_translation_status(
FormStateInterface $form_state
) : void {
$menu_parent = $form['menu']['link']['menu_parent']['#default_value'];
if (!$menu_parent) {
return;
}
$menu_name = explode(':', $menu_parent)[0];

$values = $form_state->getValue('menu');
$node = $form_state->getFormObject()->getEntity();
$langCode = $node->language()->getId();
Expand Down

0 comments on commit f5d662f

Please sign in to comment.