Blame view

common/modules/product/helpers/ProductHelper.php 368 Bytes
a8370482   Alexander Karnovsky   init project
1
2
3
4
  <?php
  
  namespace common\modules\product\helpers;
  
b519af22   Karnovsky A   Base-product func...
5
6
  use common\modules\product\models\Brand;
  use common\modules\product\models\Category;
a8370482   Alexander Karnovsky   init project
7
8
9
  use yii\base\Object;
  
  class ProductHelper extends Object {
a8370482   Alexander Karnovsky   init project
10
      public static function getCategories() {
b519af22   Karnovsky A   Base-product func...
11
          return Category::find()->getTree();
a8370482   Alexander Karnovsky   init project
12
13
14
      }
  
      public static function getBrands() {
b519af22   Karnovsky A   Base-product func...
15
          return Brand::find();
a8370482   Alexander Karnovsky   init project
16
17
      }
  }