[GOVRACPROD-44] Create Block visibility interface.#54
Closed
g2410g wants to merge 19 commits intofeature/GOVRACPROD-45from
Closed
[GOVRACPROD-44] Create Block visibility interface.#54g2410g wants to merge 19 commits intofeature/GOVRACPROD-45from
g2410g wants to merge 19 commits intofeature/GOVRACPROD-45from
Conversation
8 tasks
gargsuchi
reviewed
Jan 14, 2026
webform_openfisca.module
Outdated
| * Implements hook_preprocess_block(); | ||
| */ | ||
| function webform_openfisca_preprocess_block(array &$variables): void { | ||
| // Get the block ID. |
Contributor
There was a problem hiding this comment.
@g2410g We need to make sure that this function applies only to the blocks that have a rule associated with them
Contributor
There was a problem hiding this comment.
Check against the findRacBlockContentForWebform function
gargsuchi
reviewed
Jan 14, 2026
webform_openfisca.module
Outdated
| $current_block_id = $query['blocks'] ?? NULL; | ||
| $current_block_ids = explode(',', $current_block_id); | ||
|
|
||
| if ($block_content && $block_content->bundle() == 'civictheme_component_block') { |
gargsuchi
reviewed
Jan 14, 2026
webform_openfisca.module
Outdated
| /** | ||
| * Implements hook_preprocess_block(). | ||
| */ | ||
| function webform_openfisca_preprocess_block(array &$variables): void { |
Contributor
There was a problem hiding this comment.
@g2410g We should try and use this hook instead hook_block_access
0e83f39 to
3216b89
Compare
gargsuchi
reviewed
Jan 15, 2026
src/RacContentHelper.php
Outdated
| } | ||
|
|
||
| /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $block_content_storage */ | ||
| $block_content_storage = $this->entityTypeManager->getStorage('block_content'); |
Contributor
There was a problem hiding this comment.
@g2410g Can you help me understand this logic?
field_block_rac_element is a field for the Block RAC Elements paragraph type.
How will it have the paragraph_ids from above? They are paragraphs of the type field_block_webform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://salsadigital.atlassian.net/browse/GOVRACPROD-44
Checklist before requesting a review
[#123] Verb in past tense with dot at the end.Changedsection about WHY something was done if this was not a normal implementationChanged
Screenshots