コード例 #1
0
ファイル: Attributes.php プロジェクト: jigoshop/Jigoshop2
 public function ajaxRemoveAttribute()
 {
     $errors = array();
     if (!isset($_POST['id']) || empty($_POST['id'])) {
         $errors[] = __('Attribute does not exist.', 'jigoshop');
     }
     if (!empty($errors)) {
         echo json_encode(array('success' => false, 'error' => join('<br/>', $errors)));
         exit;
     }
     $this->productService->removeAttribute((int) $_POST['id']);
     echo json_encode(array('success' => true));
     exit;
 }
コード例 #2
0
ファイル: PhpFastCache.php プロジェクト: jigoshop/Jigoshop2
 /**
  * Removes attribute from database.
  *
  * @param int $id Attribute ID.
  */
 public function removeAttribute($id)
 {
     unset($this->attributes[$id]);
     return $this->service->removeAttribute($id);
 }