@throws

@return \Generated\Shared\Transfer\BrandCollectionTransfer
435840
public function getActiveBrands(): BrandCollectionTransfer
    {
        $query = $this->getFactory()
            ->createBrandQuery()
            ->filterByIsActive(true);

        $brandEntityCollectionTransfer = $this->buildQueryFromCriteria($query)->find();

        return $this->getFactory()->createBrandMapper()->mapCollectionTransfer($brandEntityCollectionTransfer);
    }
1220257
public function copy(): Collection
    {
        $items = $this->items;
        $resolver = $this->resolver;

        return new static($items, $resolver);
    }
268022
public function getDraftCollectionAction()
    {
        $contents = $this->getEntityManager()
            ->getRepository('BackBee\ClassContent\Revision')
            ->getAllDrafts($this->getApplication()->getBBUserToken())
        ;

        $contents = $this->sortDraftCollection($contents);

        return $this->addContentRangeHeadersToResponse($this->createJsonResponse($contents), $contents, 0);
    }
714546
public function import(?DataImporterConfigurationTransfer $dataImporterConfigurationTransfer = null): DataImporterReportTransfer
    {
        return $this->getFactory()->createMerchantDataImport()->import($dataImporterConfigurationTransfer);
    }
1214514
public function expandCustomerTransferWithProductListIds(CustomerTransfer $customerTransfer): CustomerTransfer
    {
        if ($this->hasCustomerTransferProductLists($customerTransfer)) {
            return $customerTransfer;
        }

        $companyUserTransfer = $customerTransfer->getCompanyUserTransfer();

        if ($companyUserTransfer === null || $companyUserTransfer->getCompany() === null) {
            return $customerTransfer;
        }

        $productListCollectionTransfer = $this->productListReader->getProductListCollectionByIdCompanyId(
            $companyUserTransfer->getCompany()
        );

        $this->addProductListsToCustomerTransfer($customerTransfer, $productListCollectionTransfer);

        return $customerTransfer;
    }
771832
public function expandCustomerTransferWithProductListIds(CustomerTransfer $customerTransfer): CustomerTransfer
    {
        $customerTransfer->setCustomerProductListCollection(new CustomerProductListCollectionTransfer());

        $productListCollectionTransfer = $this->productListReader->getProductListCollectionByIdCustomerId(
            $customerTransfer
        );

        $this->addProductListsToCustomerTransfer($customerTransfer, $productListCollectionTransfer);

        return $customerTransfer;
    }
277571
public function getBrandCollectionByAbstractIdProduct(int $idProductAbstract): BrandCollectionTransfer
    {
        /** @var \Orm\Zed\Brand\Persistence\FosBrand[] $brandEntities */
        $brandEntities = $this->getFactory()
            ->getBrandQuery()
            ->useFosBrandProductQuery()
                ->filterByFkProductAbstract($idProductAbstract)
            ->endUse()
            ->find();

        $brandCollectionTransfer = new BrandCollectionTransfer();
        $brandProductMapper = $this->getFactory()->createBrandProductMapper();

        foreach ($brandEntities as $brandEntity) {
            $brandCollectionTransfer->addBrand(
                $brandProductMapper->mapBrand($brandEntity, new BrandTransfer())
            );
        }

        return $brandCollectionTransfer;
    }
1353489
protected function hydrateBrandListWithBrands(BrandCollectionTransfer $brandListTransfer, array $brands): void
    {
        $brandCollection = new ArrayObject();

        foreach ($brands as $brand) {
            $brandCollection->append(
                $this->getFactory()
                    ->createBrandMapper()
                    ->mapBrandEntityToBrand($brand)
            );
        }

        $brandListTransfer->setBrands($brandCollection);
    }
880374
public function getProductAbstractCollectionByBrandId(int $idBrand): BrandProductAbstractRelationTransfer
    {
        /** @var \Orm\Zed\BrandProduct\Persistence\FosBrandProduct[] $brandProductEntities */
        $brandProductEntities = $this->getFactory()
            ->getBrandProductQuery()
            ->findByFkBrand($idBrand);

        $productAbstractIds = [];
        foreach ($brandProductEntities as $entity) {
            $productAbstractIds[] = $entity->getFkProductAbstract();
        }

        $brandCollectionTransfer = new BrandProductAbstractRelationTransfer();
        $brandCollectionTransfer->setIdBrand($idBrand);
        $brandCollectionTransfer->setProductAbstractIds($productAbstractIds);

        return $brandCollectionTransfer;
    }
617581
private function returnTransfertToPlain()
    {
        if ($this->returnTransfert()) {
            if (!curl_setopt($this->ch, CURLOPT_TRANSFERTEXT, true)) {
                $this->close();

                return false;
            }
        }

        return true;
    }
466082
public function createProductAbstractBrands(ProductAbstractTransfer $productAbstractTransfer): ProductAbstractTransfer
    {
        if ($productAbstractTransfer->getBrandCollection() !== null) {
            $requestedBrandIds = $this->getBrandIds($productAbstractTransfer->getBrandCollection());

            if (count($requestedBrandIds) > 0) {
                $this->brandProductEntityManager->addBrandProductRelations($productAbstractTransfer->getIdProductAbstract(), $requestedBrandIds);
            }

            $productAbstractTransfer->setBrandCollection($this->brandProductReader->getBrandCollectionByIdProductAbstractId($productAbstractTransfer));
        }

        return $productAbstractTransfer;
    }
73810
public function getData(AbstractTransfer $quoteTransfer): QuoteTransfer
    {
        if ($quoteTransfer->getPayment() === null) {
            $paymentTransfer = new PaymentTransfer();
            $paymentTransfer->setPayone(new PayonePaymentTransfer());
            $quoteTransfer->setPayment($paymentTransfer);
        }

        return $quoteTransfer;
    }
1242764
public function mapBrandTransfer(FosBrandEntityTransfer $brandEntityTransfer): BrandTransfer
    {
        $brandTransfer = new BrandTransfer();

        $brandTransfer->fromArray($brandEntityTransfer->toArray(), true);

        return $brandTransfer;
    }
203787
protected function get_collection_from() {
        if ($this->collectionfrom === null) {
            $this->collectionfrom = api::search_competencies('', $this->from);
        }
        return $this->collectionfrom;
    }
577353
protected function get_collection_to() {
        if ($this->collectionto === null) {
            $this->collectionto = api::search_competencies('', $this->to);
        }
        return $this->collectionto;
    }
544847
public function getProductListCompanyRelation(
        ProductListCompanyRelationTransfer $productListCompanyRelationTransfer
    ): ProductListCompanyRelationTransfer {
        $productListCompanyRelationTransfer->requireIdProductList();

        $companyIds = $this->productListCompanyRepository->getRelatedCompanyIdsByIdProductList(
            $productListCompanyRelationTransfer->getIdProductList()
        );

        $productListCompanyRelationTransfer->setCompanyIds($companyIds);

        return $productListCompanyRelationTransfer;
    }
190821
public function updateMany(): Collection
	{
		$collection = new Collection();

		foreach ($this->getInput() as $item) {
			$repository = clone $this;
			$repository->setInput($item);
			$collection->add($repository->update($repository->getInputId()));
		}

		return $collection;
	}