Sylius\Behat\Context\Setup\ProductContext::thisProductHasCheckboxAttributeWithValue PHP Method

thisProductHasCheckboxAttributeWithValue() public method

public thisProductHasCheckboxAttributeWithValue ( Sylius\Component\Core\Model\ProductInterface $product, $productAttributeType, $productAttributeName, $value )
$product Sylius\Component\Core\Model\ProductInterface
    public function thisProductHasCheckboxAttributeWithValue(ProductInterface $product, $productAttributeType, $productAttributeName, $value)
    {
        $attribute = $this->createProductAttribute($productAttributeType, $productAttributeName);
        $booleanValue = 'Yes' === $value;
        $attributeValue = $this->createProductAttributeValue($booleanValue, $attribute);
        $product->addAttribute($attributeValue);
        $this->objectManager->flush();
    }