예제 #1
0
파일: Page.php 프로젝트: hsleonis/basetech
 public function getCategory_list()
 {
     return $this->hasOne(ProductCategory::className(), ['id' => 'category_id'])->viaTable('page_category_rel', ['page_id' => 'id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductCategory()
 {
     return $this->hasOne(ProductCategory::className(), ['id' => 'product_category_id']);
 }
예제 #3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductCategories()
 {
     return $this->hasMany(ProductCategory::className(), ['parent_id' => 'id']);
 }