コード例 #1
0
 /**
  * A form for updating cart items
  */
 public function CartForm()
 {
     $cart = $this->Cart();
     if (!$cart) {
         return false;
     }
     $form = CartForm::create($this, "CartForm", $cart);
     $this->extend('updateCartForm', $form);
     return $form;
 }
コード例 #2
0
 /**
  * A form for updating cart items
  */
 public function CartForm()
 {
     $cart = $this->Cart();
     if (!$cart) {
         return false;
     }
     $form = CartForm::create($this, "CartForm", $cart);
     $this->extend('updateCartForm', $form);
     // if accessing through the model, warn that the hook is going to go away
     $this->dataRecord->extend('updateCartForm', $form, $cart);
     if ($this->dataRecord->hasMethod('updateCartForm')) {
         Deprecation::notice('2.0', 'Please access updateCartForm through CartPage_Controller instead of CartPage (this extension point is due to be removed)');
     }
     return $form;
 }
コード例 #3
0
ファイル: CartPage.php プロジェクト: vinstah/body
 /**
  * Form including quantities for items for displaying on the cart page.
  * 
  * @return CartForm A new cart form
  */
 function CartForm()
 {
     return CartForm::create($this, 'CartForm')->disableSecurityToken();
 }