public function getPlaceCategories()
 {
     return $this->hasMany(CategoryGoogle::className(), ['id', 'categoria_id'])->viaTable(PlaceCategory::className(), ['categoria_id' => 'id']);
 }
Esempio n. 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategoria()
 {
     return $this->hasOne(CategoryGoogle::className(), ['id' => 'categoria_id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getPlaces()
 {
     $this->hasMany(CategoryGoogle::className(), ['id' => 'categoria_id'])->viaTable('place_category', ['categoria_id' => 'id']);
 }
Esempio n. 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCategoryGoogles()
 {
     return $this->hasMany(CategoryGoogle::className(), ['parent_id' => 'id_categoria']);
 }