public function create()
    {
        $zeroPrice = $this->createZeroAmountMoney();

        /**
         * @var Variant $variant
         */
        $classNamespace = $this->getEntityNamespace();
        $variant = new $classNamespace();
        $variant
            ->setSku('')
            ->setStock(0)
            ->setPrice($zeroPrice)
            ->setReducedPrice($zeroPrice)
            ->setImages(new ArrayCollection())
            ->setOptions(new ArrayCollection())
            ->setWidth(0)
            ->setHeight(0)
            ->setWidth(0)
            ->setDepth(0)
            ->setWeight(0)
            ->setShowInHome(false)
            ->setImagesSort('')
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $variant;
    }
public function create()
    {
        $zeroPrice = $this->createZeroAmountMoney();

        /**
         * @var Variant $variant
         */
        $classNamespace = $this->getEntityNamespace();
        $variant = new $classNamespace();
        $variant
            ->setSku('')
            ->setStock(0)
            ->setPrice($zeroPrice)
            ->setReducedPrice($zeroPrice)
            ->setImages(new ArrayCollection())
            ->setOptions(new ArrayCollection())
            ->setWidth(0)
            ->setHeight(0)
            ->setWidth(0)
            ->setDepth(0)
            ->setWeight(0)
            ->setShowInHome(false)
            ->setImagesSort('')
            ->setEnabled(true)
            ->setCreatedAt($this->now());

        return $variant;
    }
public function create ( ) { $ zeroPrice = $ this -> createZeroAmountMoney ( ) ; /**
         * @var Variant $variant
         */ $ classNamespace = $ this -> getEntityNamespace ( ) ; $ variant = new $ classNamespace ( ) ; $ variant -> setSku ( '' ) -> setStock ( 0 ) -> setPrice ( $ zeroPrice ) -> setReducedPrice ( $ zeroPrice ) -> setImages ( new ArrayCollection ( ) ) -> setOptions ( new ArrayCollection ( ) ) -> setWidth ( 0 ) -> setHeight ( 0 ) -> setWidth ( 0 ) -> setDepth ( 0 ) -> setWeight ( 0 ) -> setShowInHome ( false ) -> setImagesSort ( '' ) -> setEnabled ( true ) -> setCreatedAt ( $ this -> now ( ) ) ; return $ variant ; }
Creates and returns a pristine Variant instance.

Prices are initialized to "zero amount" Money value objects,
using injected CurrencyWrapper default Currency

@return Variant New Variant entity
Creates and returns a pristine Variant instance .