trilha extends controller
Public SDK Controller.
Extend this class to implement HTTP controllers in your plugin while benefiting from the framework routing and middleware lifecycle.
Table of Contents
Constants
- CREATEOREDIT = 'trilha/Edit'
- TRILHAINDEX = 'trilha/Index'
- TRILHARENDER = 'Trilha'
Properties
- $admin_section : string
- $require_login : bool
Methods
- create() : Response
- Renders the preview of a Trilha Pedagógica (pedagogic path).
- delete() : Response
- This method handles both deleting a store.
- edit() : Response
- Renders the preview of a Trilha Pedagógica (pedagogic path).
- enable_or_disable() : Response
- This method handles both enabling and disabling a store.
- get_course_groups() : Response
- This method handles both creating a customform.
- get_enable_trilha() : Response
- This method handles both deleting a store.
- get_trilha() : Response
- This method handles both creating a customform.
- index() : Response
- This method handles both listing stores and showing a specific store by ID.
- render_trilha() : Response
- render trilha.
- set_default_trilha() : Response
- This method handles both deleting a store.
- set_user_trilha_preference() : Response
- This method handles both deleting a store.
Constants
CREATEOREDIT
public
mixed
CREATEOREDIT
= 'trilha/Edit'
TRILHAINDEX
public
mixed
TRILHAINDEX
= 'trilha/Index'
TRILHARENDER
public
mixed
TRILHARENDER
= 'Trilha'
Properties
$admin_section
protected
string
$admin_section
= ''
$require_login
protected
bool
$require_login
= true
Methods
create()
Renders the preview of a Trilha Pedagógica (pedagogic path).
public
create() : Response
Attributes
- #[Route]
- $path: 'trilha/create'
- $name: 'trilha_create'
- $methods: ['GET', 'POST']
Return values
Response —the rendered response for the Trilha preview
delete()
This method handles both deleting a store.
public
delete(mixed $id) : Response
Parameters
- $id : mixed
Attributes
- #[Route]
- $path: 'trilha/delete/{id}'
- $name: 'trilha_delete'
- $methods: ['POST']
Return values
Responseedit()
Renders the preview of a Trilha Pedagógica (pedagogic path).
public
edit(int $id) : Response
Parameters
- $id : int
-
the ID of the Trilha Pedagógica to be rendered
Attributes
- #[Route]
- $path: 'trilha/edit/{id}'
- $name: 'trilha_edit'
- $methods: ['GET', 'POST']
Return values
Response —the rendered response for the Trilha preview
enable_or_disable()
This method handles both enabling and disabling a store.
public
enable_or_disable(mixed $id) : Response
Parameters
- $id : mixed
Attributes
- #[Route]
- $path: 'trilha/enable_or_disable/{id}'
- $name: 'trilha_enable_or_disable'
- $methods: ['POST']
Return values
Responseget_course_groups()
This method handles both creating a customform.
public
get_course_groups() : Response
Attributes
- #[Route]
- $path: 'trilha/get_course_groups'
- $name: 'trilha_get_course_groups'
- $methods: ['GET']
Return values
Responseget_enable_trilha()
This method handles both deleting a store.
public
get_enable_trilha() : Response
Attributes
- #[Route]
- $path: 'trilha/get_enable_trilhas'
- $name: 'trilha_get_enable_trilha'
- $methods: ['GET']
Return values
Responseget_trilha()
This method handles both creating a customform.
public
get_trilha(mixed $id) : Response
Parameters
- $id : mixed
Attributes
- #[Route]
- $path: 'trilha/get_trilha/{id}'
- $name: 'trilha_get_trilha'
- $methods: ['GET']
Return values
Responseindex()
This method handles both listing stores and showing a specific store by ID.
public
index() : Response
Attributes
- #[Route]
- $path: 'trilha'
- $name: 'trilha_index'
- $methods: ['GET']
Return values
Responserender_trilha()
render trilha.
public
render_trilha(mixed $id) : Response
Parameters
- $id : mixed
Attributes
- #[Route]
- $path: 'trilha/view/{id}'
- $name: 'trilha_view'
- $methods: ['GET']
Return values
Responseset_default_trilha()
This method handles both deleting a store.
public
set_default_trilha(mixed $id) : Response
Parameters
- $id : mixed
Attributes
- #[Route]
- $path: 'trilha/set_default/{id}'
- $name: 'trilha_set_default'
- $methods: ['POST']
Return values
Responseset_user_trilha_preference()
This method handles both deleting a store.
public
set_user_trilha_preference(mixed $id) : Response
Parameters
- $id : mixed
Attributes
- #[Route]
- $path: 'trilha/set_user_trilha_preference/{id}'
- $name: 'trilha_set_user_trilha_preference'
- $methods: ['POST']