Esempio n. 1
0
 public function getPhotos()
 {
     return $this->hasMany(Photo::className(), ['item_id' => 'item_id'])->where(['class' => self::className()])->sort();
 }
Esempio n. 2
0
 public function behaviors()
 {
     return [['class' => 'yii\\filters\\ContentNegotiator', 'formats' => ['application/json' => Response::FORMAT_JSON]], ['class' => SortableController::className(), 'model' => Photo::className()]];
 }
Esempio n. 3
0
 public function getPhotos()
 {
     return $this->hasMany(Photo::className(), ['item_id' => 'album_id'])->where(['model' => Album::className()])->sort();
 }