Exemplo n.º 1
0
 protected function findModel($id)
 {
     if (($model = ProductsImages::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 2
0
 public function getImages()
 {
     $this->_images = ProductsImages::findAll(['product_id' => $this->id]);
     return $this->_images;
 }