示例#1
0
 public static function deleteGood($id)
 {
     $dbPref = new DBPreferencesType();
     $catalogPath = $dbPref->getPreference(Constants::CATALOG_PATH)[DB::TABLE_PREFERENCES__VALUE];
     $goodsType = new DBGoodsType();
     $code = $goodsType->getCode($id);
     //remove directory with images
     FileUtils::removeDir($catalogPath . $code);
     $infoRemove = $goodsType->delete($id);
     return $infoRemove;
 }