wip-feat: populates filter from api options
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\User\Framework\Entity;
|
||||
|
||||
use Aimeos\Map;
|
||||
use App\User\Framework\Repository\PreferencesRepository;
|
||||
use App\User\Framework\Repository\UserRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
@@ -184,4 +185,12 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getUserPreferenceValues()
|
||||
{
|
||||
return Map::from($this->userPreferences)
|
||||
->rekey(fn(UserPreference $userPreference) => $userPreference->getPreference()->getId())
|
||||
->map(fn(UserPreference $userPreference) => $userPreference->getPreferenceValue())
|
||||
->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user