コード例 #1
0
 protected function findModel($id)
 {
     if (($model = ProductsImages::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
コード例 #2
0
ファイル: Products.php プロジェクト: cubiclab/store-cube
 public function getImages()
 {
     $this->_images = ProductsImages::findAll(['product_id' => $this->id]);
     return $this->_images;
 }