Skip to content

Commit

Permalink
Merge pull request #1786 from goalgorilla/bugfix/3123861
Browse files Browse the repository at this point in the history
Issue #3123861 by Kingdutch: Image label is visible on basic page tea…
  • Loading branch information
ronaldtebrake committed Jun 23, 2020
2 parents 4180c11 + ff64b11 commit 7073e08
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ content:
field_book_image:
type: image
weight: 0
label: above
label: hidden
settings:
image_style: social_x_large
image_link: content
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
core.entity_view_display.node.book.teaser:
expected_config:
content:
field_book_image:
label: above
update_actions:
change:
content:
field_book_image:
label: hidden
core.entity_view_display.node.book.hero:
expected_config:
content:
field_book_image:
label: above
update_actions:
change:
content:
field_book_image:
label: hidden
20 changes: 20 additions & 0 deletions modules/social_features/social_book/social_book.install
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ function social_book_update_dependencies() {
'social_core' => 8802,
];

// Ensure update helper dependant hooks run after update helper
// is enabled.
$dependencies['social_book'][8802] = [
'social_core' => 8805,
];

return $dependencies;
}

Expand Down Expand Up @@ -147,3 +153,17 @@ function social_book_update_8801() {
}
}
}

/**
* Hide image label in teasers.
*/
function social_book_update_8802() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

// Execute configuration update definitions with logging of success.
$updateHelper->executeUpdate('social_book', 'social_book_update_8802');

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ dependencies:
- image
- options
- user
_core:
default_config_hash: 9sTjSemSHaUnHQeBsGy479G03O1t-_i_tHF7IHFPEO0
id: node.page.teaser
targetEntityType: node
bundle: page
Expand All @@ -31,7 +29,7 @@ content:
field_page_image:
type: image
weight: 0
label: above
label: hidden
settings:
image_style: social_x_large
image_link: content
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
core.entity_view_display.node.page.teaser:
expected_config:
content:
field_page_image:
label: above
update_actions:
change:
content:
field_page_image:
label: hidden
14 changes: 14 additions & 0 deletions modules/social_features/social_page/social_page.install
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,17 @@ function social_page_update_8001() {
// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

/**
* Hide image label in teasers.
*/
function social_page_update_8002() {
/** @var \Drupal\update_helper\Updater $updateHelper */
$updateHelper = \Drupal::service('update_helper.updater');

// Execute configuration update definitions with logging of success.
$updateHelper->executeUpdate('social_page', 'social_page_update_8002');

// Output logged messages to related channel of update execution.
return $updateHelper->logger()->output();
}

0 comments on commit 7073e08

Please sign in to comment.