Kaynağa Gözat

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Guillaume 3 yıl önce
ebeveyn
işleme
80ab0f2ad3
3 değiştirilmiş dosya ile 6 ekleme ve 3 silme
  1. +2
    -1
      Controller/User/UserAdminController.php
  2. +2
    -1
      Repository/Product/ProductFamilyRepositoryQuery.php
  3. +2
    -1
      Repository/StoreTrait.php

+ 2
- 1
Controller/User/UserAdminController.php Dosyayı Görüntüle

@@ -31,7 +31,8 @@ abstract class UserAdminController extends SovUserAdminController
foreach ($entity->getActions() as $action){
if($action->getName() == ActionDefinition::SWITCH_USER){
$sectionDefault = $this->getSectionContainer()->getStore()->setMerchant($this->getMerchantCurrent())->getOneDefault();
$url = $this->generateUrl($this->getParameter('lc_sov.homepage_route'), array('_switch_user' => $entity->getInstance()->getEmail(), 'section'=> $sectionDefault));
dump($sectionDefault);
$url = $this->generateUrl($this->getParameter('lc_sov.homepage_route'), array('_switch_user' => $entity->getInstance()->getEmail(), 'section'=> $sectionDefault->getSlug()));
$action->setLinkUrl($url);
}
}

+ 2
- 1
Repository/Product/ProductFamilyRepositoryQuery.php Dosyayı Görüntüle

@@ -29,7 +29,8 @@ class ProductFamilyRepositoryQuery extends AbstractRepositoryQuery

$this->leftJoin('.productFamilySectionProperties', 'productFamilySectionProperties');
if ($addSelect) {
$this->addSelect('productFamilySectionProperties');
//NB : Ici le select est en commentaire car si il est actif doctrine n'hydrate pas correectement ProductFamilySectionProperties (si filtre sur section les ProductFamilySectionProperties des autres sections ne sont pas chargé et ça peut être problématique pr la gestion des stocks)
//$this->addSelect('productFamilySectionProperties');
}
}
return $this;

+ 2
- 1
Repository/StoreTrait.php Dosyayı Görüntüle

@@ -4,7 +4,7 @@ namespace Lc\CaracoleBundle\Repository;

trait StoreTrait
{
public function resetContext(): void
public function resetContext(): self
{
if(method_exists($this, 'setMerchant')) {
$this->setMerchant(null);
@@ -13,5 +13,6 @@ trait StoreTrait
if(method_exists($this, 'setSection')) {
$this->setSection(null);
}
return $this;
}
}

Yükleniyor…
İptal
Kaydet