VLAM Documentation

PodcastController extends BaseController
in package

Class BaseController

BaseController provides a convenient place for loading components and performing functions that are needed by all your controllers. Extend this class in any new controllers: class Home extends BaseController

For security be sure to declare any new methods as protected or private.

Table of Contents

Properties

$assignmentEntry  : mixed
$assignmentEntryProperties  : mixed
$assignmentResult  : mixed
$assignments  : mixed
$caseEntry  : mixed
$caseEntryProperties  : mixed
$caseResult  : mixed
$cases  : mixed
$data  : mixed
$helpers  : array<int, string>
An array of helpers to be loaded automatically upon class instantiation. These helpers will be available to all other controllers that extend BaseController.
$meetings  : mixed
$request  : CLIRequest|IncomingRequest
Instance of the main Request object.
$user  : mixed

Methods

get_assignment()  : mixed
get_assignment_results()  : mixed
get_case()  : mixed
Get case from database and make sure it exists
get_case_results()  : mixed
get_edit_route()  : mixed
get_entry_properties_result()  : array<string|int, mixed>
Retrieves entry properties and maps property values based on user ID.
get_meeting()  : mixed
get_training()  : mixed
index()  : string
initController()  : mixed
user_in_training()  : mixed
initSessionController()  : void
validTrainingForUser()  : mixed

Properties

$assignmentEntryProperties

protected mixed $assignmentEntryProperties

$helpers

An array of helpers to be loaded automatically upon class instantiation. These helpers will be available to all other controllers that extend BaseController.

protected array<int, string> $helpers = ['download', 'csrf', 'user', 'front/dashboard', 'front/sidebar', 'front/header', 'front/footer']

$request

Instance of the main Request object.

protected CLIRequest|IncomingRequest $request

Methods

get_assignment()

public get_assignment(int $assignment_id) : mixed
Parameters
$assignment_id : int

get_assignment_results()

public get_assignment_results(int $assignment_id) : mixed
Parameters
$assignment_id : int

get_case()

Get case from database and make sure it exists

public get_case(int $assignment_id, int $case_id) : mixed
Parameters
$assignment_id : int
$case_id : int

get_case_results()

public get_case_results(int $case_id) : mixed
Parameters
$case_id : int

get_edit_route()

public get_edit_route(string $route, mixed ...$args) : mixed
Parameters
$route : string
$args : mixed

get_entry_properties_result()

Retrieves entry properties and maps property values based on user ID.

public get_entry_properties_result(int $id, string $id_key, object &$result_object, object &$entry_object, object &$property_object) : array<string|int, mixed>

This function fetches results from the given result object (assignment or case), joins it with the entry object, and maps the corresponding property values using the property object.

Parameters
$id : int

The ID of the entry to fetch properties for.

$id_key : string

The column name used to filter results by ID.

$result_object : object

The model instance representing the results table (passed by reference).

$entry_object : object

The model instance representing the entry table (passed by reference).

$property_object : object

The model instance representing the property table (passed by reference).

Return values
array<string|int, mixed>

An array of results with mapped property values. Returns an empty array if no user ID is found.

get_meeting()

public get_meeting(int $meeting_id) : mixed
Parameters
$meeting_id : int

get_training()

public get_training(int $training_id) : mixed
Parameters
$training_id : int

index()

public index(mixed $meeting_id, mixed $assignment_id) : string
Parameters
$meeting_id : mixed
$assignment_id : mixed
Return values
string

initController()

public initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) : mixed
Parameters
$request : RequestInterface
$response : ResponseInterface
$logger : LoggerInterface

user_in_training()

public user_in_training(int $user_id, int $training_id) : mixed
Parameters
$user_id : int
$training_id : int

validTrainingForUser()

private validTrainingForUser(mixed $user) : mixed
Parameters
$user : mixed

        
On this page

Search results