Skip to content

Commit

Permalink
fixup! fixed incorrect usage of frontend-api class in framework package
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmannmartin committed Sep 23, 2024
1 parent 69808c6 commit 8b9cbfc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Twig/HiddenPriceExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

use Shopsys\FrameworkBundle\Model\Customer\User\CustomerUser;
use Shopsys\FrameworkBundle\Model\Customer\User\Role\CustomerUserRoleResolver;
use Shopsys\FrontendApiBundle\Component\Price\MoneyFormatterHelper;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;

class HiddenPriceExtension extends AbstractExtension
{
protected const string HIDDEN_FORMAT = '***';

/**
* @param \Shopsys\FrameworkBundle\Model\Customer\User\Role\CustomerUserRoleResolver $customerUserRoleResolver
*/
Expand Down Expand Up @@ -41,7 +42,7 @@ public function getFilters(): array
public function hidePriceFilter(string $price, ?CustomerUser $customerUser): string
{
if (!$this->customerUserRoleResolver->canCustomerUserSeePrices($customerUser)) {
return MoneyFormatterHelper::HIDDEN_FORMAT;
return static::HIDDEN_FORMAT;
}

return $price;
Expand Down

0 comments on commit 8b9cbfc

Please sign in to comment.