Skip to content

Commit

Permalink
exclude field only for class definition (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingjia90 authored May 24, 2022
1 parent f706048 commit 1d77d7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/02_Exclude_Fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ advanced_object_search:
- productName
- productNumber
```
Please Note: Currently is not possible to exclude any specific field under a structured fieldset like `Object Bricks` and `Field collections`, but it is only possible to exclude the field entirely for a specific class.
2 changes: 1 addition & 1 deletion src/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function getFieldSelectionInformationForClassDefinition($definition, $all
);

foreach ($fieldDefinitions as $fieldDefinition) {
if ($this->isExcludedField($definition->getName(), $fieldDefinition->getName())) {
if ($definition instanceof ClassDefinition && $this->isExcludedField($definition->getName(), $fieldDefinition->getName())) {
continue;
}

Expand Down

0 comments on commit 1d77d7d

Please sign in to comment.