Skip to content
Snippets Groups Projects
Commit a45fa9be authored by Eric Bremner's avatar Eric Bremner
Browse files

Issue #3187495: editing description for both block and section IDs

parent e301a304
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ class LayoutBuilderIdsConfigureBlock implements EventSubscriberInterface { ...@@ -30,7 +30,7 @@ class LayoutBuilderIdsConfigureBlock implements EventSubscriberInterface {
if (in_array($form['#form_id'], ['layout_builder_add_block', 'layout_builder_update_block'], TRUE)) { if (in_array($form['#form_id'], ['layout_builder_add_block', 'layout_builder_update_block'], TRUE)) {
// Pull out the layout_builder_id from config. // Pull out the layout_builder_id from config.
$layout_builder_id = $event->getFormState()->getFormObject()->getCurrentComponent()->get('layout_builder_id'); $layout_builder_id = &$event->getFormState()->getFormObject()->getCurrentComponent()->get('layout_builder_id');
// Add the section id to the configure form. // Add the section id to the configure form.
$form['settings']['layout_builder_id'] = [ $form['settings']['layout_builder_id'] = [
...@@ -38,7 +38,7 @@ class LayoutBuilderIdsConfigureBlock implements EventSubscriberInterface { ...@@ -38,7 +38,7 @@ class LayoutBuilderIdsConfigureBlock implements EventSubscriberInterface {
'#title' => 'Block ID', '#title' => 'Block ID',
'#weight' => 99, '#weight' => 99,
'#default_value' => $layout_builder_id ?: NULL, '#default_value' => $layout_builder_id ?: NULL,
'#description' => t('Enter an ID for the block. IDs can contain letters, numbers, underscore, hyphen and period characters, and should start with a letter.'), '#description' => t('Block ID is an optional setting which is used to support an anchor link to this block. For example, entering "feature" lets you link directly to this block by adding "#feature" to the end of the URL.</br>IDs should start with a letter, may only contain letters, numbers, underscores, hyphens, and periods, and should be unique on the page.'),
]; ];
// Add our custom submit function. // Add our custom submit function.
......
...@@ -39,7 +39,7 @@ class LayoutBuilderIdsConfigureSection implements EventSubscriberInterface { ...@@ -39,7 +39,7 @@ class LayoutBuilderIdsConfigureSection implements EventSubscriberInterface {
'#title' => 'Section ID', '#title' => 'Section ID',
'#weight' => 99, '#weight' => 99,
'#default_value' => $config['layout_builder_id'] ?: NULL, '#default_value' => $config['layout_builder_id'] ?: NULL,
'#description' => t('Enter an ID for the section. IDs can contain letters, numbers, underscore, hyphen and period characters, and should start with a letter.'), '#description' => t('Section ID is an optional setting which is used to support an anchor link to this block. For example, entering "feature" lets you link directly to this section by adding "#feature" to the end of the URL.</br>IDs should start with a letter, may only contain letters, numbers, underscores, hyphens, and periods, and should be unique on the page.'),
]; ];
// Add our custom submit handler. // Add our custom submit handler.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment