Custom Actions
Beyond standard CRUD operations, Chamilo has a number of custom API action controllers (in the order of dozens) that handle specialized operations. The exact count varies between releases — list src/CoreBundle/Controller/Api/ for the current set.
Location
Custom actions are in src/CoreBundle/Controller/Api/.
Notable Custom Actions
Documents
CreateDocumentFileAction
Upload a file or create a folder/link document
UpdateDocumentFileAction
Replace a document's file
ReplaceDocumentFileAction
Replace a document file, preserving its IDs
MoveDocumentAction
Move a document to a different folder
UpdateVisibilityDocument
Toggle document visibility for learners
DownloadAllDocumentsAction
Download all documents in a folder as a ZIP
DownloadSelectedDocumentsAction
Download a selected set of documents as a ZIP
DocumentUsageAction
List courses/sessions where a document is used
DocumentLearningPathUsageAction
List learning paths where a document is used
Glossary
CreateCGlossaryAction
Create a glossary term
UpdateCGlossaryAction
Update a glossary term
ExportCGlossaryAction
Export glossary to file
ImportCGlossaryAction
Import glossary from file
ExportGlossaryToDocumentsAction
Export glossary as a document in the course
GetGlossaryCollectionController
Get glossary collection with custom filtering
Links
CreateCLinkAction
Create an external link
UpdateCLinkAction
Update an external link
CreateCLinkCategoryAction
Create a link category
UpdateCLinkCategoryAction
Update a link category
CheckCLinkAction
Check whether a link URL is reachable
ExportCLinksAction
Export links to file
CLinkDetailsController
Get link details
CLinkImageController
Get or set a link's preview image
GetLinksCollectionController
Get links collection with custom filtering
UpdateVisibilityLink
Toggle link visibility
UpdateVisibilityLinkCategory
Toggle link category visibility
UpdatePositionLink
Reorder links
Learning Paths
CreateCLpAction
Create a learning path
LpReorderController
Reorder learning path items
Calendar
UpdateCCalendarEventAction
Update a course calendar event
CalendarMyStudentsScheduleAction
Get the schedule of a teacher's students
Blog
CreateCBlogAction
Create a blog post
CreateBlogAttachmentAction
Attach a file to a blog post
UpdateVisibilityBlog
Toggle blog visibility
Dropbox
CreateDropboxFileAction
Upload a file to the dropbox (file exchange tool)
Student Work (Assignments)
CreateStudentPublicationFileAction
Submit an assignment file
CreateStudentPublicationCommentAction
Add a comment to a submission
CreateStudentPublicationCorrectionFileAction
Upload a correction file for a submission
Personal Files
CreatePersonalFileAction
Upload a file to the user's personal file space
UpdatePersonalFileAction
Update a personal file
Social
LikeSocialPostController
Like a social post
DislikeSocialPostController
Unlike a social post
CreateSocialPostAttachmentAction
Attach a file to a social post
SocialPostAttachmentsController
List attachments on a social post
AbstractFeedbackSocialPostController
Base class for social post feedback actions
Sessions
CreateSessionWithUsersAndCoursesAction
Create a session and enrol users and courses in one call
Users & Access URLs
CreateUserOnAccessUrlAction
Create a user and associate them with an access URL
UserAccessUrlsController
List access URLs a user belongs to
UserSkillsController
List skills awarded to a user
Video Conference
VideoConferenceCallbackController
Handle callbacks from external video conference providers
Base Classes
BaseResourceFileAction
Base class for file-upload actions; handles multipart parsing, resource node creation, and storage
Implementing a Custom Action
Custom actions are standard Symfony controllers referenced in API Platform operation definitions. The #[ApiResource] attribute lives on the entity, and each operation's controller: parameter points to the action class:
The action class itself is a plain invokable controller — services are injected via __invoke() method arguments:
Key points:
deserialize: falseis set when the action reads the request directly (e.g. multipart file uploads) instead of letting API Platform deserialize a JSON body.File-upload actions typically extend
BaseResourceFileAction, which handles multipart parsing and resource node wiring.Security is enforced via the
security:parameter on the operation, not inside the controller.
Last updated
Was this helpful?