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

Add extra configurations to Semantic Breadcrumbs #314

Open
DiegoPino opened this issue Mar 29, 2024 · 0 comments
Open

Add extra configurations to Semantic Breadcrumbs #314

DiegoPino opened this issue Mar 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request Typed Data and Search UI/UX Experience
Milestone

Comments

@DiegoPino
Copy link
Member

What?

Right now our ADO breadcrumbs are very flexible but sometimes when you have multiple levels of relationship between children and parent you might want to be able to choose to e.g exclude from breadcrumb a few predicates or the opposite, force breadcrumb to only work on a few.

Because breadcrumbs use one of our computed field here

$fields['field_sbf_nodetonode'] = BaseFieldDefinition::create('entity_reference')
->setName('field_sbf_nodetonode')
->setLabel('Related ADOs')
->setSetting('target_type', 'node')
->setTargetEntityTypeId('node')
->setDescription(t('Computed Node to Node relationships'))
->setComputed(TRUE)
->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED)
->setRevisionable(FALSE)
->setReadOnly(TRUE)
->setTranslatable(FALSE)
->setClass(StrawberryFieldEntityComputedItemList::class);
return $fields;

that fetches any ADO to ADO relationship, one option would be to allow computed level sub properties
So a getValue() directly on the field will get me all, but another accessor with arguments would allow me to filter out
Another option is to have a second computed one. We could of course simply use this via normal field/data logic (kinda bring out of the class the code and query the JSON directly) but i like computed fields because they abstract and hide complexities and allow us in the future to improve the logic without changing the calling code.

Anyway. This is needed for 1.4.0 before the release

@DiegoPino DiegoPino self-assigned this Mar 29, 2024
@DiegoPino DiegoPino added enhancement New feature or request Typed Data and Search UI/UX Experience labels Mar 29, 2024
@DiegoPino DiegoPino added this to the 1.4.0 milestone Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Typed Data and Search UI/UX Experience
Projects
None yet
Development

No branches or pull requests

1 participant