本文整理匯總了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();
}