public function addVariant(VariantInterface $variant)
    {
        if (!$this->hasVariant($variant)) {
            $variant->setObject($this);
            $this->variants->add($variant);
        }

        return $this;
    }
public function addVariant(VariantInterface $variant)
    {
        if (!$this->hasVariant($variant)) {
            $variant->setObject($this);
            $this->variants->add($variant);
        }

        return $this;
    }
public function addVariant ( VariantInterface $ variant ) { if ( ! $ this -> hasVariant ( $ variant ) ) { $ variant -> setObject ( $ this ) ; $ this -> variants -> add ( $ variant ) ; } return $ this ; }
Adds a variant

@param VariantInterface $variant

@return $this
Adds a variant