Skip to content
Snippets Groups Projects
Commit c07603f9 authored by renatog's avatar renatog Committed by De Araujo, Renato [CONBR Non-J&J]
Browse files

Issue #3347101: Create hook update to update the paragraph label on sites that...

Issue #3347101: Create hook update to update the paragraph label on sites that already have the EBT Accordion installed
parent 7bda56a1
Branches
Tags
1 merge request!13Issue #3347101: Create hook update to update the paragraph label on sites that already have the EBT Accordion installed
<?php
/**
* @file
* Install, update and uninstall functions for the EBT Accordion.
*/
/**
* Set the label of "ebt_accordion" to 'EBT Accordion section / FAQ section'.
*/
function ebt_accordion_update_9101() {
// Get the paragraph type entity.
$paragraph_type = \Drupal::entityTypeManager()->getStorage('paragraphs_type')->load('ebt_accordion');
// If empty for any reason, just skip this.
if (empty($paragraph_type)) {
return;
}
// Set the new label.
$paragraph_type->label = 'EBT Accordion section / FAQ section';
// Save the object.
$paragraph_type->save();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment