coursegroup_controller 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
Properties
Methods
- __construct() : mixed
- Constructor with dependency injection.
- create() : RedirectResponse|Response
- Create a new coursegroup.
- edit() : RedirectResponse|Response
- Edit an existing coursegroup.
- index() : Response
- This method handles the index page.
Properties
$coursegroup_service read-only
private
coursegroup_service
$coursegroup_service
Methods
__construct()
Constructor with dependency injection.
public
__construct(coursegroup_service $coursegroup_service) : mixed
Parameters
- $coursegroup_service : coursegroup_service
-
Injected by the kernel's DI container
create()
Create a new coursegroup.
public
create() : RedirectResponse|Response
Tags
Attributes
- #[Route]
- $path: '/coursegroup/create'
- $name: 'coursegroup_create'
- $methods: ['GET', 'POST']
Return values
RedirectResponse|Responseedit()
Edit an existing coursegroup.
public
edit([int $id = 0 ]) : RedirectResponse|Response
Parameters
- $id : int = 0
Tags
Attributes
- #[Route]
- $path: '/coursegroup/edit/{id}'
- $name: 'coursegroup_edit'
- $methods: ['GET', 'POST']
Return values
RedirectResponse|Responseindex()
This method handles the index page.
public
index() : Response
List all coursegroups.
Tags
Attributes
- #[Route]
- $path: '/coursegroup'
- $name: 'coursegroup_index'
- $methods: ['GET']