Lecker home page
Search...
⌘K
Support
Dashboard
Dashboard
Search...
Navigation
Content Controller
File_Content
Documentation
Controllers
lecker
github
treat agency
MY Controller
Introduction
MY_Controller_Data
MY_Controller_Debug
MY_Controller_Lingual
MY_Controller_Modules
Lecker Controller
Introduction
Content Controller
Introduction
Article_Entity_Content
File_Content
Helper_Content
Image_Content
Item_Dev_Content
Lecker_Content
Meta_Content
Modules_Content
Noarticle_Entity_Content
Shop_Content
Tags_Content
Frontend Controller
Introduction
Data_Frontend
Detail_Load_Frontend
Format_Frontend
Forms Frontend
Helper_Frontend
Language Frontend
Module_Frontend
Pages_Frontend
User_Frontend
Backend Controller
Introduction
Helper_Backend
Repository Controller
Introduction
Shop Controller
Introduction
Authentication Controller
Introduction
User Controller
Introduction
On this page
Main Methods
files()
file_tags()
uploadFile()
upload_image()
upload_pdf()
Configuration Properties
Columns and Filters
listColumns (for files)
filterColumns (for files)
Input Fields (for files)
Content Controller
File_Content
Trait for handling file and image content management in a PHP application
The
File_Content
trait provides functionality for managing files, file tags, and handling file uploads in a content management system.
Main Methods
files()
Sets up the configuration for managing files in the system.
Key Actions
Sets group name to “Files”
Defines list and filter columns
Prepares select data for file tags and colors
Defines input fields (columns) for file entities
file_tags()
Manages the tags associated with files.
Key Actions
Sets group name to “Files”
Defines list and filter columns for tags
Sets up a simple structure for managing file tags
uploadFile()
Handles the upload of files (PDF, ZIP, VTT).
Parameters
POST data
filename: Name of the file to be uploaded
uploadpath: Path where the file should be uploaded
Returns
JSON response with upload status, file path, and filename
upload_image()
Handles the upload of image files.
Parameters
POST data
filename: Name of the image file to be uploaded
uploadpath: Path where the image should be uploaded
Returns
JSON response with upload status, file path, and filename
upload_pdf()
Handles the upload of PDF files (and some image formats).
Parameters
POST data
filename: Name of the PDF file to be uploaded
uploadpath: Path where the PDF should be uploaded
Returns
JSON response with upload status, file path, and filename
Configuration Properties
groupName
string
default:
"Files"
Defines the group name for file-related entities.
typeOfTable
string
default:
""
Specifies the type of table (left empty in this trait).
Columns and Filters
listColumns (for files)
title_en
title
file_tag
ordering
file_download
filterColumns (for files)
Same as listColumns, used for filtering in the UI.
Input Fields (for files)
Key fields include:
file_download
file
The actual file to be uploaded and managed.
title_en
text
English title of the file.
title
text
German title of the file.
ordering
text
Ordering of the file in lists.
description
ckeditor
German description of the file.
description_en
ckeditor
English description of the file.
image
image
An image or logo associated with the file.
file_tag
select
Tag associated with the file.
Article_Entity_Content
Helper_Content
Assistant
Responses are generated using AI and may contain mistakes.