public function actions() { return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['posts' => KskPosts::className()]]]; }
public function actions() { return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['publication' => Publication::className()]]]; }
public function actions() { return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['about' => About::className()]]]; }
/** * @inheritdoc */ public function actions() { return ['error' => ['class' => 'yii\\web\\ErrorAction'], 'gallery' => ['class' => GalleryManagerAction::className(), 'types' => ['user' => User::className()]]]; }
public function actions() { return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['service' => Service::className()]]]; }
public function actions() { return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['product' => Exclusives::className()]]]; }
public function actions() { return ['galleryApi' => ['class' => GalleryManagerAction::className(), 'types' => ['travellers' => Travellers::className()]]]; }
/** * 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); }