Пример #1
0
 public function actions()
 {
     return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['posts' => KskPosts::className()]]];
 }
 public function actions()
 {
     return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['publication' => Publication::className()]]];
 }
Пример #3
0
 public function actions()
 {
     return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['about' => About::className()]]];
 }
Пример #4
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ['error' => ['class' => 'yii\\web\\ErrorAction'], 'gallery' => ['class' => GalleryManagerAction::className(), 'types' => ['user' => User::className()]]];
 }
Пример #5
0
 public function actions()
 {
     return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['service' => Service::className()]]];
 }
Пример #6
0
 public function actions()
 {
     return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['product' => Exclusives::className()]]];
 }
 public function actions()
 {
     return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['travellers' => Travellers::className()]]];
 }
Пример #8
0
 /**
  * Override gallery api actions to remove the deleted image ids from the
  * estimate entries.
  * @param string $action
  * @return mixed
  */
 public function actionGalleryApi($action)
 {
     if ($action == 'delete') {
         $ids = Yii::$app->request->post('id');
         $entries = EstimateEntry::find()->where(['product_image_id' => $ids])->all();
         foreach ($entries as $entry) {
             $entry->product_image_id = null;
             $entry->save();
         }
     }
     $apiActionCofing = ['class' => GalleryManagerAction::className(), 'types' => [Product::GALLERY_IMAGE_TYPE => Product::className()]];
     $apiAction = Yii::createObject($apiActionCofing, ['gallery-api', $this]);
     return $apiAction->run($action);
 }