Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.4.11 #206

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ field_name: localgov_url
entity_type: paragraph
bundle: localgov_banner_primary
label: URL
description: 'An optional url. Adding a url here will make the whole box a link.'
description: 'An optional url. Adding a url here will make the banner title a link.'
required: false
translatable: true
default_value: { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use Drupal\field\Entity\FieldStorageConfig;
/**
* Implements hook_update_N().
*/
function localgov_subsites_paragraphs_update_10001() {
function localgov_subsites_paragraphs_update_10001():void {
$paragraphType = 'localgov_accordion';
$display = 'paragraph.' . $paragraphType . '.default';
$existingFields = [
Expand Down Expand Up @@ -125,3 +125,16 @@ function localgov_subsites_paragraphs_update_10001() {
}
}
}

/**
* Update the description of the localgov_url field.
*/
function localgov_subsites_paragraphs_update_10002():void {
// Update the description of the localgov_url field to match what we have
// in config.
$field = FieldConfig::loadByName('paragraph', 'localgov_banner_primary', 'localgov_url');
if ($field) {
$field->setDescription(t('An optional url. Adding a url here will make the banner title a link.'));
$field->save();
}
}
Loading