Sets the products of the recipe.
@param array|Product[] $products
@return $this Implementing fluent interface.
548353
public function setProducts(array $products)
    {
        $this->products = array_values(array_filter($products, function ($product): bool {
            return $product instanceof Product;
        }));
        return $this;
    }
542150
public function setCookies(array $cookies)
	{
		$this->cookies = [];
		
		foreach($cookies as $name => $value)
		{
			$this->setCookie($name, $value);
		}
		
		return $this;
	}
700591
public function setProduct(\Amulen\ShopBundle\Entity\Product $product = null)
    {
        $this->product = $product;

        return $this;
    }
1002272
public function setFields(array $fields)
    {
        $this->clearFields();

        foreach ($fields as $field) {
            $this->addField($field);
        }

        return $this;
    }
1168093
public function setProductSubscription(\HarvestCloud\CoreBundle\Entity\ProductSubscription $productSubscription = null)
    {
        $this->productSubscription = $productSubscription;

        $productSubscription->setOriginalLineItem($this);

        return $this;
    }
1325253
public function excluding(Collection $products)
	{
		$ids = $products->pluck('id');

		if ($this->excluding->count() == 0) {
			$this->excluding = $ids;
		} else {
			foreach ($ids as $id) {
				$this->excluding->push($id);
			}
		}

		return $this;
	}
1240401
public function setServices(Array $services) {
    $this->services = array();
    foreach ($services as $service) {
      $this->addService($service);
    }
    return $this;
  }
895600
public function setClasses($classes)
    {
        if (!\is_array($classes)) {
            $classes = \explode(' ', $classes);
        }
        $this->classes = $classes;

        return $this;
    }
203985
public function withCookies(array $cookies)
    {
        foreach ($cookies as $cookie) {
            $this->headers->setCookie($cookie);
        }

        return $this;
    }
851785
public function setFilters($filters = []) {
		if ($filters) {
			foreach ($filters as $key => $value) {
				$this->setFilter($key, $value);
			}
		}

		return $this;
	}
849864
protected function prepareProductsCompare(array &$products)
    {
        foreach ($products as $product_id => &$product) {
            $product['field'] = $this->product_field->getList($product_id);
            $this->setItemProductFields($product, $this->image, $this->product_class);
        }
    }
954827
protected function setIds(array $product)
    {
        $this->setLastEntityId(isset($product[MemberNames::ENTITY_ID]) ? $product[MemberNames::ENTITY_ID] : null);
    }
172720
public function addAll(array $items) : Set
    {
        $values = $this->_pushAll($items);
        $this->setValues($values);
        return $this;
    }
1306759
public function setProduct(\Sulu\Bundle\ProductBundle\Entity\ProductInterface $product = null)
    {
        $this->product = $product;

        return $this;
    }
181938
public function setPackages(array $packages) {
		$this->resetPackages();
		
		foreach ($packages as $package) {
			$this->appendPackage($package);
		}
		
		return $this;
	}
1275615
public function setFields(array $fields)
    {
        foreach ($fields as $key => $field) {
            $this->setField($key, $field);
        }

        return $this;
    }
1322563
public function set(array $pairs)
	{
		foreach ($pairs as $column => $value)
		{
			$this->_set[] = array($column, $value);
		}

		return $this;
	}