public static function deleteContent($content_id, $content_type, $ctrl) { if ($content_type == "user") { User::deleteUserAndAllInfo($content_id); } elseif ($content_type == "article") { AdminBlog::DeleteArticle($content_id, $ctrl); } elseif ($content_type == 'photo') { AdminPhoto::deletePhoto($content_id); } elseif ($content_type == 'club') { AdminClub::deleteClub($content_id); } elseif ($content_type == 'message') { AdminMessages::deleteMessage($content_id); } }
public function actionSaveResizeToPhotoDay() { $post = Yii::$app->request->post(); AdminPhoto::setCoordinatesToPhotoDay($post['photo_id'], $post['x1'], $post['y1'], $post['background_size']); }