예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategories()
 {
     return $this->hasMany(Category::className(), ['parent' => 'id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(Category::className(), ['id' => 'category_id']);
 }
예제 #3
0
파일: Product.php 프로젝트: kalibao/magesko
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAccountantCategory()
 {
     return $this->hasOne(Category::className(), ['id' => 'accountant_category_id']);
 }