当前位置: 首页>>代码示例>>PHP>>正文


PHP Prefs::getShopCategory方法代码示例

本文整理汇总了PHP中Prefs::getShopCategory方法的典型用法代码示例。如果您正苦于以下问题:PHP Prefs::getShopCategory方法的具体用法?PHP Prefs::getShopCategory怎么用?PHP Prefs::getShopCategory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Prefs的用法示例。


在下文中一共展示了Prefs::getShopCategory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beforeUpdate

 public function beforeUpdate($id, $data)
 {
     if (isset($data['file_id']) && count($data['file_id'])) {
         $mediaindex = 0;
         for ($i = 0; $i < count($data['thumbnail_url']); $i++) {
             $index = $mediaindex;
             $data['files'][$data['file_id'][$i]]['ns'] = $data['ns'][$i];
             $data['files'][$data['file_id'][$i]]['role'] = $data['role'][$i];
             $data['files'][$data['file_id'][$i]]['thumbnail_url'] = $data['thumbnail_url'][$i];
             $data['files'][$data['file_id'][$i]]['large_url'] = $data['large_url'][$i];
             $data['files'][$data['file_id'][$i]]['medium_url'] = $data['medium_url'][$i];
             $data['files'][$data['file_id'][$i]]['full_url'] = $data['full_url'][$i];
             $data['files'][$data['file_id'][$i]]['delete_type'] = $data['delete_type'][$i];
             $data['files'][$data['file_id'][$i]]['delete_url'] = $data['delete_url'][$i];
             $data['files'][$data['file_id'][$i]]['filename'] = $data['filename'][$i];
             $data['files'][$data['file_id'][$i]]['filesize'] = $data['filesize'][$i];
             $data['files'][$data['file_id'][$i]]['temp_dir'] = $data['temp_dir'][$i];
             $data['files'][$data['file_id'][$i]]['filetype'] = $data['filetype'][$i];
             $data['files'][$data['file_id'][$i]]['is_image'] = $data['is_image'][$i];
             $data['files'][$data['file_id'][$i]]['is_audio'] = $data['is_audio'][$i];
             $data['files'][$data['file_id'][$i]]['is_video'] = $data['is_video'][$i];
             $data['files'][$data['file_id'][$i]]['fileurl'] = $data['fileurl'][$i];
             $data['files'][$data['file_id'][$i]]['file_id'] = $data['file_id'][$i];
             $data['files'][$data['file_id'][$i]]['sequence'] = $mediaindex;
             $mediaindex++;
             $data['defaultpic'] = $data['file_id'][0];
             $data['defaultpictures'] = $data['files'][$data['file_id'][0]];
         }
     } else {
         $data['defaultpic'] = '';
         $data['defaultpictures'] = '';
     }
     if (!isset($data['shortcode']) || $data['shortcode'] == '') {
         $data['shortcode'] = str_random(5);
     }
     $cats = Prefs::getShopCategory()->shopcatToSelection('slug', 'name', false);
     $data['shopcategory'] = $cats[$data['shopcategoryLink']];
     return $data;
 }
开发者ID:awidarto,项目名称:jexadmin,代码行数:39,代码来源:OrderarchiveController.php

示例2: postAssignshopcat

 public function postAssignshopcat()
 {
     $in = Input::get();
     $category = $in['category'];
     $cats = Prefs::getShopCategory()->ShopCatToSelection('slug', 'name', false);
     $product_ids = $in['product_ids'];
     foreach ($product_ids as $p) {
         $prop = Member::find($p);
         $prop->shopcategory = $cats[$category];
         $prop->shopcategoryLink = $category;
         $prop->save();
     }
     return Response::json(array('result' => 'OK'));
 }
开发者ID:awidarto,项目名称:jexadmin,代码行数:14,代码来源:AjaxController.php


注:本文中的Prefs::getShopCategory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。