Skip to content

Commit

Permalink
Merge pull request #392 from City-of-Helsinki/UHF-8975_paragraph_order
Browse files Browse the repository at this point in the history
UHF-8975 Paragraph order
  • Loading branch information
khalima authored Jan 18, 2024
2 parents 3b68e2d + 585dae2 commit ad62570
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
label: Sisältönosto
description: 'Sisältönostolla voit nostaa yksittäisen sisällön tämän sivuston sisältä. Sisällön tiedot haetaan automaattisesti viitteen kautta ja sisältö esitetään korttinäkymässä.'
label: Toimipistekortti
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: Työpaikkahaku
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,21 @@ function helfi_rekry_content_page_attachments_alter(array &$attachments) {
* Implements hook_helfi_paragraph_types().
*/
function helfi_rekry_content_helfi_paragraph_types() : array {
// @todo UHF-9511 Remove the content liftup paragraph type.
$entities = [
'node' => [
'landing_page' => [
'field_content' => [
'job_search',
'content_liftup' => 11,
'job_search' => 15,
],
],
'page' => [
'field_content' => [
'content_liftup' => 12,
],
'field_lower_content' => [
'content_liftup' => 12,
],
],
],
Expand All @@ -661,8 +671,8 @@ function helfi_rekry_content_helfi_paragraph_types() : array {
foreach ($entities as $entityTypeId => $bundles) {
foreach ($bundles as $bundle => $fields) {
foreach ($fields as $field => $paragraphTypes) {
foreach ($paragraphTypes as $paragraphType) {
$enabled[] = new ParagraphTypeCollection($entityTypeId, $bundle, $field, $paragraphType);
foreach ($paragraphTypes as $paragraphType => $weight) {
$enabled[] = new ParagraphTypeCollection($entityTypeId, $bundle, $field, $paragraphType, $weight);
}
}
}
Expand Down

0 comments on commit ad62570

Please sign in to comment.