Browse Source

Fix

packProduct
Guillaume 3 years ago
parent
commit
3429fb185f
2 changed files with 13 additions and 1 deletions
  1. +1
    -1
      Controller/Site/PageAdminController.php
  2. +12
    -0
      Field/AssociationField.php

+ 1
- 1
Controller/Site/PageAdminController.php View File



public function createEntity(string $entityFqcn) public function createEntity(string $entityFqcn)
{ {
return $this->get(PageContainer::class)
return $this->getPageContainer()
->getFactory() ->getFactory()
->setSection($this->get(SectionResolver::class)->getCurrent()) ->setSection($this->get(SectionResolver::class)->getCurrent())
->create(); ->create();

+ 12
- 0
Field/AssociationField.php View File

return $this; return $this;
} }


public function setFilterOnMerchantViaSection(MerchantInterface $merchant): self
{
$this->queryBuilderParameters['merchantViaSection'] = $merchant;

return $this;
}

public function setFilterOnDevAlias(string $devAlias): self public function setFilterOnDevAlias(string $devAlias): self
{ {
$this->queryBuilderParameters['devAlias'] = $devAlias; $this->queryBuilderParameters['devAlias'] = $devAlias;
$qb->andWhereMerchantManyToMany('e', $param['merchantManyToMany']); $qb->andWhereMerchantManyToMany('e', $param['merchantManyToMany']);
} }


if (isset($param['merchantViaSection'])) {
$qb->leftJoin('e.section', 's');
$qb->andWhereMerchant('s', $param['merchantViaSection']);
}

if (isset($param['status'])) { if (isset($param['status'])) {
$qb->andWhere('e.status = :status')->setParameter('status', $param['status']); $qb->andWhere('e.status = :status')->setParameter('status', $param['status']);
} }

Loading…
Cancel
Save