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


PHP Model_Category::getCategoryAll方法代碼示例

本文整理匯總了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();
 }
開發者ID:anton-phpcurs,項目名稱:mvc,代碼行數:9,代碼來源:controller_contactus.php

示例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();
 }
開發者ID:anton-phpcurs,項目名稱:mvc,代碼行數:11,代碼來源:controller_user.php

示例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();
 }
開發者ID:anton-phpcurs,項目名稱:mvc,代碼行數:24,代碼來源:controller_lots.php


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