/** * removing all the suppliers * * @return Product */ public function clearSuppliers() { SupplierCode::updateByCriteria('active = 0', 'productId = ?', array($this->getId())); return $this; }