PHP Class Sylius\Bundle\CoreBundle\Fixture\Factory\ProductExampleFactory

Author: Kamil Kokot ([email protected])
Inheritance: implements Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface
Datei anzeigen Open project: sylius/sylius

Public Methods

Method Description
__construct ( Sylius\Component\Resource\Factory\FactoryInterface $productFactory, Sylius\Component\Resource\Factory\FactoryInterface $productVariantFactory, Sylius\Component\Resource\Factory\FactoryInterface $channelPricing, Sylius\Component\Product\Generator\ProductVariantGeneratorInterface $variantGenerator, Sylius\Component\Resource\Factory\FactoryInterface $productAttributeValueFactory, Sylius\Component\Resource\Factory\FactoryInterface $productImageFactory, Sylius\Component\Resource\Factory\FactoryInterface $productTaxonFactory, Sylius\Component\Core\Uploader\ImageUploaderInterface $imageUploader, Sylius\Component\Product\Generator\SlugGeneratorInterface $slugGenerator, Sylius\Component\Resource\Repository\RepositoryInterface $taxonRepository, Sylius\Component\Resource\Repository\RepositoryInterface $productAttributeRepository, Sylius\Component\Resource\Repository\RepositoryInterface $productOptionRepository, Sylius\Component\Resource\Repository\RepositoryInterface $channelRepository, Sylius\Component\Resource\Repository\RepositoryInterface $localeRepository )
create ( array $options = [] )

Protected Methods

Method Description
configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver )

Private Methods

Method Description
createChannelPricings ( Sylius\Component\Core\Model\ProductVariantInterface $productVariant, Sylius\Component\Core\Model\ChannelInterface $channel )
createImages ( Sylius\Component\Core\Model\ProductInterface $product, array $options )
createProductTaxons ( Sylius\Component\Core\Model\ProductInterface $product, array $options )
createRelations ( Sylius\Component\Core\Model\ProductInterface $product, array $options )
createTranslations ( Sylius\Component\Core\Model\ProductInterface $product, array $options )
createVariants ( Sylius\Component\Core\Model\ProductInterface $product, array $options )
getLocales ( ) : Generator
getRandomValueForProductAttribute ( Sylius\Component\Product\Model\ProductAttributeInterface $productAttribute ) : mixed

Method Details

__construct() public method

public __construct ( Sylius\Component\Resource\Factory\FactoryInterface $productFactory, Sylius\Component\Resource\Factory\FactoryInterface $productVariantFactory, Sylius\Component\Resource\Factory\FactoryInterface $channelPricing, Sylius\Component\Product\Generator\ProductVariantGeneratorInterface $variantGenerator, Sylius\Component\Resource\Factory\FactoryInterface $productAttributeValueFactory, Sylius\Component\Resource\Factory\FactoryInterface $productImageFactory, Sylius\Component\Resource\Factory\FactoryInterface $productTaxonFactory, Sylius\Component\Core\Uploader\ImageUploaderInterface $imageUploader, Sylius\Component\Product\Generator\SlugGeneratorInterface $slugGenerator, Sylius\Component\Resource\Repository\RepositoryInterface $taxonRepository, Sylius\Component\Resource\Repository\RepositoryInterface $productAttributeRepository, Sylius\Component\Resource\Repository\RepositoryInterface $productOptionRepository, Sylius\Component\Resource\Repository\RepositoryInterface $channelRepository, Sylius\Component\Resource\Repository\RepositoryInterface $localeRepository )
$productFactory Sylius\Component\Resource\Factory\FactoryInterface
$productVariantFactory Sylius\Component\Resource\Factory\FactoryInterface
$channelPricing Sylius\Component\Resource\Factory\FactoryInterface
$variantGenerator Sylius\Component\Product\Generator\ProductVariantGeneratorInterface
$productAttributeValueFactory Sylius\Component\Resource\Factory\FactoryInterface
$productImageFactory Sylius\Component\Resource\Factory\FactoryInterface
$productTaxonFactory Sylius\Component\Resource\Factory\FactoryInterface
$imageUploader Sylius\Component\Core\Uploader\ImageUploaderInterface
$slugGenerator Sylius\Component\Product\Generator\SlugGeneratorInterface
$taxonRepository Sylius\Component\Resource\Repository\RepositoryInterface
$productAttributeRepository Sylius\Component\Resource\Repository\RepositoryInterface
$productOptionRepository Sylius\Component\Resource\Repository\RepositoryInterface
$channelRepository Sylius\Component\Resource\Repository\RepositoryInterface
$localeRepository Sylius\Component\Resource\Repository\RepositoryInterface

configureOptions() protected method

protected configureOptions ( Symfony\Component\OptionsResolver\OptionsResolver $resolver )
$resolver Symfony\Component\OptionsResolver\OptionsResolver

create() public method

public create ( array $options = [] )
$options array