Airport Guide Documentation

FsImageController extends BaseController
in package

FS Image Controller

This controller manages comprehensive FS (Four Square) image operations including image management, primary image setting, image uploads, and image processing for hotels, parking, and rental cars. It provides functionality for managing FS images with advanced filtering, image categorization, and image processing status management for airport services.

Table of Contents

Methods

__construct()  : void
Create a new FsImageController instance.
changeImageLevel()  : bool
Change the image level name for a terminal image.
changeLevelText()  : bool
Change the level text for a terminal image.
create()  : View
Show the form for creating a new resource.
deleteImage()  : void
Delete an image from the terminal gallery.
destroy()  : RedirectResponse
Remove the specified resource from storage.
edit()  : View
Show the form for editing the specified resource.
fsmanagementImage()  : View
Show the FS management image gallery for a specific FSQ ID.
getFsDetail()  : string
Get FS details for a specific category and ID.
getImagesByFsqId()  : string
Get images by FSQ ID for a specific category.
index()  : View
Display a listing of FS images with category-based filtering and status management.
setImageAsPrimary()  : void
Set an image as primary for a specific FSQ ID and category.
setImageFlag()  : JsonResponse
Set the image flag for a hotel, parking, or rental car image.
setNoPrimaryImage()  : void
Remove primary image status for a specific FSQ ID and category.
show()  : View
Show the form for creating a new resource.
sorting()  : void
Sort the gallery photos based on drag and drop order.
store()  : RedirectResponse
Store a newly created resource in storage.
update()  : RedirectResponse
Update the specified resource in storage.
upload()  : JsonResponse|null
Upload an image for a terminal (CKEditor or similar usage).
UploadImageToServer()  : void
Upload a new image to the FS gallery and create a thumbnail.

Methods

__construct()

Create a new FsImageController instance.

public __construct() : void

Checks if user is logged in and has proper permissions for FS image management. Implements custom permission checking based on category type and URL parameters. Redirects to appropriate page if permissions are not met.

changeImageLevel()

Change the image level name for a terminal image.

public changeImageLevel(Request $request, int $id) : bool

Updates the level name of a terminal image in the database.

Parameters
$request : Request
$id : int
Return values
bool

changeLevelText()

Change the level text for a terminal image.

public changeLevelText(Request $request, int $id) : bool

Updates the level text of a terminal image in the database.

Parameters
$request : Request
$id : int
Return values
bool

create()

Show the form for creating a new resource.

public create(Request $request) : View
Parameters
$request : Request
Return values
View

deleteImage()

Delete an image from the terminal gallery.

public deleteImage(Request $request, int $id) : void

Deletes the image and its thumbnail from the filesystem and removes the record from the database.

Parameters
$request : Request
$id : int

destroy()

Remove the specified resource from storage.

public destroy(mixed $id) : RedirectResponse
Parameters
$id : mixed
Return values
RedirectResponse

edit()

Show the form for editing the specified resource.

public edit(mixed $id, Request $request) : View
Parameters
$id : mixed
$request : Request
Return values
View

fsmanagementImage()

Show the FS management image gallery for a specific FSQ ID.

public fsmanagementImage(int $id, Request $request) : View

Loads the FS management images and related information for a given FSQ ID.

Parameters
$id : int
$request : Request
Return values
View

getFsDetail()

Get FS details for a specific category and ID.

public getFsDetail(Request $request) : string

Retrieves and displays FS details for hotels, parking, or rental cars. Returns formatted HTML for FS information display with business validation controls. Supports comprehensive FS information management and business validation.

Parameters
$request : Request
Return values
string

getImagesByFsqId()

Get images by FSQ ID for a specific category.

public getImagesByFsqId(Request $request) : string

Retrieves and displays FS images for a specific FSQ ID and category. Returns formatted HTML for image gallery with primary image management controls. Supports image gallery display with primary image setting functionality.

Parameters
$request : Request
Return values
string

index()

Display a listing of FS images with category-based filtering and status management.

public index(Request $request) : View

Provides a paginated list of FS images categorized by hotels, parking, and rental cars. Supports filtering by image processing status (pending, processed, all) and location. Includes comprehensive image management functionality for different service categories.

Parameters
$request : Request
Return values
View

setImageAsPrimary()

Set an image as primary for a specific FSQ ID and category.

public setImageAsPrimary(Request $request) : void

Updates the primary image status for a specific FSQ ID and category. Unsets current primary image and sets new one as primary. Updates corresponding service records with primary image information.

Parameters
$request : Request

setImageFlag()

Set the image flag for a hotel, parking, or rental car image.

public setImageFlag(Request $request) : JsonResponse

Updates the image flag (e.g., valid/invalid) for a specific image and category type. Returns a JSON response indicating success or error.

Parameters
$request : Request
Return values
JsonResponse

setNoPrimaryImage()

Remove primary image status for a specific FSQ ID and category.

public setNoPrimaryImage(Request $request) : void

Removes primary image status from all images for a specific FSQ ID and category. Clears primary image information from corresponding service records. Supports "no good image available" functionality.

Parameters
$request : Request

show()

Show the form for creating a new resource.

public show(mixed $id, Request $request) : View
Parameters
$id : mixed
$request : Request
Return values
View

sorting()

Sort the gallery photos based on drag and drop order.

public sorting(Request $request) : void

Updates the sort order of images in the gallery based on user drag-and-drop actions. Returns a JSON-encoded status response.

Parameters
$request : Request

store()

Store a newly created resource in storage.

public store(Request $request) : RedirectResponse
Parameters
$request : Request
Return values
RedirectResponse

update()

Update the specified resource in storage.

public update(Request $request, mixed $id) : RedirectResponse
Parameters
$request : Request
$id : mixed
Return values
RedirectResponse

upload()

Upload an image for a terminal (CKEditor or similar usage).

public upload(Request $request) : JsonResponse|null

Handles file upload, renames the file, moves it to the public uploads directory, and returns the file URL for use in editors or forms.

Parameters
$request : Request
Return values
JsonResponse|null

UploadImageToServer()

Upload a new image to the FS gallery and create a thumbnail.

public UploadImageToServer(Request $request) : void

Handles file upload, saves the image and thumbnail, and inserts the image record in the database. Returns HTML for the uploaded image block for gallery display.

Parameters
$request : Request

        
On this page

Search results