Browse Source

Essais cache #489

develop
Guillaume Bourgeois 2 years ago
parent
commit
1caaf3a2c7
4 changed files with 3 additions and 5 deletions
  1. +1
    -1
      Model/Product/ProductCategoryModel.php
  2. +1
    -1
      Repository/Product/ProductCategoryRepositoryQuery.php
  3. +1
    -0
      Repository/Product/ProductCategoryStore.php
  4. +0
    -3
      Repository/Product/ProductFamilyStore.php

+ 1
- 1
Model/Product/ProductCategoryModel.php View File

protected $parent; protected $parent;


/** /**
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", mappedBy="parent" , fetch="EAGER"))
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", mappedBy="parent", fetch="EAGER")
* @ORM\OrderBy({"position" = "ASC"}) * @ORM\OrderBy({"position" = "ASC"})
*/ */
protected $childrens; protected $childrens;

+ 1
- 1
Repository/Product/ProductCategoryRepositoryQuery.php View File

namespace Lc\CaracoleBundle\Repository\Product; namespace Lc\CaracoleBundle\Repository\Product;


use Knp\Component\Pager\PaginatorInterface; use Knp\Component\Pager\PaginatorInterface;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Repository\SectionRepositoryQueryTrait; use Lc\CaracoleBundle\Repository\SectionRepositoryQueryTrait;
use Lc\SovBundle\Doctrine\EntityInterface; use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery; use Lc\SovBundle\Repository\AbstractRepositoryQuery;


return $this->andWhere('productFamilies.status = 1'); return $this->andWhere('productFamilies.status = 1');
} }

} }

+ 1
- 0
Repository/Product/ProductCategoryStore.php View File

namespace Lc\CaracoleBundle\Repository\Product; namespace Lc\CaracoleBundle\Repository\Product;


use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface; use Lc\CaracoleBundle\Model\Product\ProductCategoryInterface;
use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
use Lc\CaracoleBundle\Repository\MerchantStoreTrait; use Lc\CaracoleBundle\Repository\MerchantStoreTrait;
use Lc\CaracoleBundle\Repository\SectionStoreTrait; use Lc\CaracoleBundle\Repository\SectionStoreTrait;
use Lc\CaracoleBundle\Repository\AbstractStore; use Lc\CaracoleBundle\Repository\AbstractStore;

+ 0
- 3
Repository/Product/ProductFamilyStore.php View File

public function getOrganic($user = null, $organizeByParentCategory = true, $query = null) public function getOrganic($user = null, $organizeByParentCategory = true, $query = null)
{ {
$query = $this->createDefaultQuery($query); $query = $this->createDefaultQuery($query);

$query $query
->filterIsOrganicLabel() ->filterIsOrganicLabel()
->filterIsOnline(); ->filterIsOnline();

$results = $query->find(); $results = $query->find();


return $this->getWithReductions($results, $user, false, $organizeByParentCategory); return $this->getWithReductions($results, $user, false, $organizeByParentCategory);
return []; return [];
} }



// findByTerms // findByTerms
public function getByTerms( public function getByTerms(
$terms, $terms,

Loading…
Cancel
Save