Model: Accept passed properties in the constructor#161
Merged
Conversation
This fixes a long standing oversight which wasn't even noticed when fixing access to a private property as it accessed `$this->properties` initially. This must have been a typo and the intendend check was to avoid passing an empty array and null to `setProperties`, as the constructor was always final and it is impossible the property can be non-empty at this stage. And even if so, why on earth would a base implementation only accept custom properties if it already has some…
yhabteab
approved these changes
May 21, 2026
Member
yhabteab
left a comment
There was a problem hiding this comment.
And even if so, why on earth would a base implementation only accept custom properties if it already has some…
Idk 🤷!
nilmerg
added a commit
to Icinga/icingadb-web
that referenced
this pull request
May 22, 2026
This PR adds a new `V2/Icinga2Source` hook implementation to integrate with the `V2/SourceHook` interface from `icinga-notifications-web`. ### Supporting changes required by the hook: - Introduce `QueryValuesProvider` — Decouples value suggestion logic from `ObjectSuggestions` into a standalone Generator-based class. This allows the hook's `getValueSuggestions()` to reuse the same suggestion infrastructure without a `Suggestions` context. - `QueryColumnsProvider`: Add `setShowRelationLabels()` setter — Exposes the relation label display option so the hook can control it. - `QueryColumnsProvider`: Make `collectFilterColumns()` protected — No longer needs to be public; the override in `SearchControls` that called it statically is removed as the optimization it provided is no longer necessary. - `ObjectSuggestions`: Remove label-to-path resolution for columns with spaces to ensure consistency between the suggestions in the search bar and suggestions provided by the `Icinga2Source`. resolves: #1365 ### Requires: - Icinga/icinga-notifications-web#469 - #1375 - Icinga/ipl-orm#161
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.
This fixes a long standing oversight which wasn't even noticed when fixing access to a private property as it accessed
$this->propertiesinitially. This must have been a typo and the intendend check was to avoid passing an empty array and null tosetProperties, as the constructor was always final and it is impossible the property can be non-empty at this stage. And even if so, why on earth would a base implementation only accept custom properties if it already has some…