本文整理汇总了PHP中Model_Category::getCategoryAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Category::getCategoryAll方法的具体用法?PHP Model_Category::getCategoryAll怎么用?PHP Model_Category::getCategoryAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_Category
的用法示例。
在下文中一共展示了Model_Category::getCategoryAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action
public function action()
{
$model = new Model_Category();
$valuesMain['catList'] = $model->getCategoryAll();
$view = new View();
$view->addBufferMain('layout', $valuesMain);
$view->addBuffers('contactus');
$view->renderBuffer();
}
示例2: actionSettings
public function actionSettings()
{
//Log::sendToScreen(__FILE__, __LINE__, 'Получить настройки из modelUsers (session_user_id)');
//Log::sendToScreen(__FILE__, __LINE__, 'View -> render');
$model = new Model_Category();
$valuesMain['catList'] = $model->getCategoryAll();
$view = new View();
$view->addBufferMain('layout', $valuesMain);
$view->addBuffers('settings');
$view->renderBuffer();
}
示例3: actionCategory
public function actionCategory()
{
if (empty($this->valueURL)) {
Application::redirect_in('/404');
}
$category = $this->valueURL[0] < 1 ? 1 : $this->valueURL[0];
$page = 1;
if (count($this->valueURL) > 2) {
if ($this->valueURL[1] == 'page') {
$page = $this->valueURL[2] < 1 ? 1 : $this->valueURL[2];
}
}
$model = new Model_Category();
$valuesMain['catList'] = $model->getCategoryAll();
$model = new Model_Lot();
$values['products'] = $model->getByCategoryID($category, $page);
$values['category'] = $valuesMain['catList'][$category - 1]['name'];
$values['pages'] = (int) ceil(count($values['products']) / 6);
$values['link'] = '/lots/category/' . $valuesMain['catList'][$category - 1]['id'] . '/page/';
$view = new View();
$view->addBufferMain('layout', $valuesMain);
$view->addBuffers('search', $values);
$view->renderBuffer();
}