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


PHP Catalog::GetCategoryDetails方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     if (isset($_GET['DepartmentId'])) {
         $this->mDepartmentId = (int) $_GET['DepartmentId'];
     } else {
         trigger_error('Отдел товаров не задан');
     }
     if (isset($_GET['CategoryId'])) {
         $this->mCategoryId = (int) $_GET['CategoryId'];
     } else {
         trigger_error('Категория товара не задана');
     }
     $category_details = Catalog::GetCategoryDetails($this->mCategoryId);
     $this->mCategoryName = $category_details['name'];
     foreach ($_POST as $key => $value) {
         if (substr($key, 0, 6) == 'submit') {
             $last_underscore = strrpos($key, '_');
             $this->_mAction = substr($key, strlen('submit_'), $last_underscore - strlen('submit_'));
             $this->_mActionedProductId = (int) substr($key, $last_underscore + 1);
             break;
         }
     }
     $this->mLinkToDepartmentCategoriesAdmin = Link::ToDepartmentCategoriesAdmin($this->mDepartmentId);
     $this->mLinkToCategoryProductsAdmin = Link::ToCategoryProductsAdmin($this->mDepartmentId, $this->mCategoryId);
 }
开发者ID:naOyD,项目名称:tshirtshop_g,代码行数:25,代码来源:admin_products.php

示例2: init

 public function init()
 {
     // If visiting a department...
     $department_details = Catalog::GetDepartmentDetails($this->_mDepartmentId);
     $this->mName = $department_details['name'];
     $this->mDescription = $department_details['description'];
     if (isset($this->_mCategoryId)) {
         // If visiting a category...
         $category_details = Catalog::GetCategoryDetails($this->_mCategoryId);
         // Header title
         $this->mName .= ' » ' . $category_details['name'];
         // Description
         $this->mDescription = $category_details['description'];
     }
 }
开发者ID:huynhchanhuy,项目名称:tshirtshop,代码行数:15,代码来源:department.php

示例3: init

 public function init()
 {
     // Если посещаем отдел
     $department_details = Catalog::GetDepartmentDetails($this->_mDepartmentId);
     $this->mName = $department_details['name'];
     $this->mDescription = $department_details['description'];
     // Если посещаем категорию
     if (isset($this->_mCategoryId)) {
         $category_details = Catalog::GetCategoryDetails($this->_mCategoryId);
         $this->mName = $this->mName . ' » ' . $category_details['name'];
         $this->mDescription = $category_details['description'];
         $this->mEditActionTarget = Link::ToDepartmentCategoriesAdmin($this->_mDepartmentId);
         $this->mEditAction = 'edit_cat_' . $this->_mCategoryId;
         $this->mEditButtonCaption = 'Радактировать категорию';
     } else {
         $this->mEditActionTarget = Link::ToDepartmentsAdmin();
         $this->mEditAction = 'edit_dept' . $this->_mDepartmentId;
         $this->mEditButtonCaption = 'Редактировать отдел';
     }
 }
开发者ID:naOyD,项目名称:tshirtshop_g,代码行数:20,代码来源:department.php


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