Sonata\Component\Basket\Basket::reset PHP Méthode

reset() public méthode

public reset ( $full = true )
    public function reset($full = true)
    {
        $this->deliveryAddressId = null;
        $this->deliveryAddress = null;
        $this->deliveryMethod = null;
        $this->deliveryMethodCode = null;
        $this->billingAddressId = null;
        $this->billingAddress = null;
        $this->paymentMethod = null;
        $this->paymentMethodCode = null;
        if ($full) {
            $this->basketElements = array();
            $this->positions = array();
            $this->cptElement = 0;
            $this->customerId = null;
            $this->customer = null;
            $this->options = array();
        }
    }

Usage Example

Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function reset($full = true)
 {
     parent::reset($full);
     if ($full) {
         $this->basketElements = new ArrayCollection();
     }
 }
All Usage Examples Of Sonata\Component\Basket\Basket::reset