Просмотр исходного кода

OrderShopRepository : recherche hors tournée et bon cadeaux

develop
Guillaume 3 лет назад
Родитель
Сommit
8dd41d578b
2 измененных файлов: 5 добавлений и 4 удалений
  1. +3
    -2
      ShopBundle/Repository/OrderShopRepository.php
  2. +2
    -2
      ShopBundle/Services/Utils.php

+ 3
- 2
ShopBundle/Repository/OrderShopRepository.php Просмотреть файл

@@ -4,6 +4,7 @@ namespace Lc\ShopBundle\Repository;

use App\Entity\DeliveryAvailabilityPointSale;
use App\Entity\DeliveryAvailabilityZone;
use App\Entity\PointSale;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
use Lc\ShopBundle\Context\DefaultRepositoryInterface;
@@ -232,11 +233,11 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
}

if($setParameterHorsTournee) {
$query->setParameter('devAliasHorsTournee', 'horstournee') ;
$query->setParameter('devAliasHorsTournee', PointSale::DEV_ALIAS_OFF_CIRCUIT) ;
}

if($setParameterGiftVoucher) {
$query->setParameter('devAliasGiftVoucher', 'giftvoucher') ;
$query->setParameter('devAliasGiftVoucher', PointSale::DEV_ALIAS_GIFT_VOUCHER) ;
}

if (isset($params['deliveryAvailability'])) {

+ 2
- 2
ShopBundle/Services/Utils.php Просмотреть файл

@@ -87,10 +87,10 @@ class Utils
return $text;
}

public function limitTextByLength($text, $length)
public function limitTextByLength($text, $length, $append = '...')
{
if(strlen($text) > $length) {
$text = substr($text, 0, $length).' ... ' ;
$text = substr($text, 0, $length) . $append ;
}

return $text ;

Загрузка…
Отмена
Сохранить