當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ProductCategory::load_images方法代碼示例

本文整理匯總了PHP中ProductCategory::load_images方法的典型用法代碼示例。如果您正苦於以下問題:PHP ProductCategory::load_images方法的具體用法?PHP ProductCategory::load_images怎麽用?PHP ProductCategory::load_images使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ProductCategory的用法示例。


在下文中一共展示了ProductCategory::load_images方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: load

 public function load()
 {
     if ($this->request('new')) {
         $Category = new ProductCategory();
     } else {
         $Category = new ProductCategory($this->request('id'));
     }
     $meta = array('specs', 'priceranges', 'options', 'prices');
     foreach ($meta as $prop) {
         if (!isset($Category->{$prop})) {
             $Category->{$prop} = array();
         }
     }
     // $Category = ShoppCollection();
     // if ( empty($Category) ) $Category = new ProductCategory();
     $Category->load_meta();
     $Category->load_images();
     return $Category;
 }
開發者ID:forthrobot,項目名稱:inuvik,代碼行數:19,代碼來源:Categories.php

示例2: editor

 /**
  * Interface processor for the category editor
  *
  * @author Jonathan Davis
  * @since 1.0
  * @return void
  **/
 public function editor()
 {
     global $CategoryImages;
     $Shopp = Shopp::object();
     if (!current_user_can('shopp_categories')) {
         wp_die(__('You do not have sufficient permissions to access this page.'));
     }
     $Category = ShoppCollection();
     if (empty($Category)) {
         $Category = new ProductCategory();
     }
     $Category->load_meta();
     $Category->load_images();
     $Price = new ShoppPrice();
     $priceTypes = ShoppPrice::types();
     $billPeriods = ShoppPrice::periods();
     // Build permalink for slug editor
     $permalink = trailingslashit(Shopp::url()) . "category/";
     $Category->slug = apply_filters('editable_slug', $Category->slug);
     $pricerange_menu = array("disabled" => __('Price ranges disabled', 'Shopp'), "auto" => __('Build price ranges automatically', 'Shopp'), "custom" => __('Use custom price ranges', 'Shopp'));
     $uploader = shopp_setting('uploader_pref');
     if (!$uploader) {
         $uploader = 'flash';
     }
     $workflows = array("continue" => __('Continue Editing', 'Shopp'), "close" => __('Categories Manager', 'Shopp'), "new" => __('New Category', 'Shopp'), "next" => __('Edit Next', 'Shopp'), "previous" => __('Edit Previous', 'Shopp'));
     do_action('add_meta_boxes', ProductCategory::$taxon, $Category);
     do_action('add_meta_boxes_' . ProductCategory::$taxon, $Category);
     do_action('do_meta_boxes', ProductCategory::$taxon, 'normal', $Category);
     do_action('do_meta_boxes', ProductCategory::$taxon, 'advanced', $Category);
     do_action('do_meta_boxes', ProductCategory::$taxon, 'side', $Category);
     include $this->ui('category.php');
 }
開發者ID:BlessySoftwares,項目名稱:anvelocom,代碼行數:39,代碼來源:Categorize.php


注:本文中的ProductCategory::load_images方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。