Ejemplo n.º 1
0
 public function getCategory()
 {
     return $this->hasOne(ProductCategory::className(), ['id' => 'category_id'])->andWhere(['!=', 'status', self::STATUS_DELETE]);
 }
Ejemplo n.º 2
0
 public function getSubcategories()
 {
     return $this->hasMany(ProductCategory::className(), ['product_category_parent_id' => 'product_category_id']);
 }
Ejemplo n.º 3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategory()
 {
     return $this->hasOne(ProductCategory::className(), ['id' => 'category_id']);
 }
Ejemplo n.º 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductCategories()
 {
     return $this->hasMany(ProductCategory::className(), ['category_id' => 'id']);
 }