-
Notifications
You must be signed in to change notification settings - Fork 14
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
IBX-7337: Added twig functions to get user preference #313
Conversation
src/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceRuntime.php
Outdated
Show resolved
Hide resolved
src/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceExtension.php
Outdated
Show resolved
Hide resolved
src/lib/MVC/Symfony/Templating/Twig/Extension/UserPreferenceRuntime.php
Outdated
Show resolved
Hide resolved
public function hasUserPreference(string $identifier): bool | ||
{ | ||
try { | ||
$this->userPreferenceService->getUserPreference($identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, as a follow-up, I'd prefer to have return $this->userPreferenceService->hasUserPreference($identifier);
instead of exception-driven logic.
21fe05d
to
b606ab6
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified with sanities.
v4.6
The first usage will be to check if the banner in the dashboard is hidden (https://github.com/ibexa/dashboard/pull/79)
Example usage:
Checklist:
$ composer fix-cs
).@ibexa/engineering
).