本文整理汇总了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);
}
示例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'];
}
}
示例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 = 'Редактировать отдел';
}
}