예제 #1
0
 public function getPhotos()
 {
     if (!$this->_photos) {
         $this->_photos = [];
         foreach (Photo::find()->where(['class' => Item::className(), 'item_id' => $this->id])->sort()->all() as $model) {
             $this->_photos[] = new PhotoObject($model);
         }
     }
     return $this->_photos;
 }
예제 #2
0
 public function behaviors()
 {
     return [['class' => SortableDateController::className(), 'model' => Item::className()], ['class' => StatusController::className(), 'model' => Item::className()]];
 }