SystemComponentFrontendController
extends Controller
in package
Frontend controller to easily create a frontent view
Tags
Table of Contents
Properties
Methods
- __call() : mixed
- Route methods like getName(), getType(), getDirectory(), etc.
- __construct() : mixed
- Creates new controller
- getPage() : mixed
- This is called by the default ComponentController and does all the repeating work
- getSystemComponentController() : SystemComponentController
- Returns the main controller
- parsePage() : mixed
- Use this to parse your frontend page
Properties
$cx
Main class instance
protected
Cx
$cx
= null
Methods
__call()
Route methods like getName(), getType(), getDirectory(), etc.
public
__call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
- $methodName : string
-
Name of method to call
- $arguments : array<string|int, mixed>
-
List of arguments for the method to call
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Return value of the method to call
__construct()
Creates new controller
public
__construct(SystemComponentController $systemComponentController, Cx $cx) : mixed
Parameters
- $systemComponentController : SystemComponentController
-
Main controller for this system component
- $cx : Cx
-
Main class instance
getPage()
This is called by the default ComponentController and does all the repeating work
public
getPage(Page $page) : mixed
This creates a template of the page content and calls parsePage($template)
Parameters
- $page : Page
-
Resolved page
getSystemComponentController()
Returns the main controller
public
getSystemComponentController() : SystemComponentController
Return values
SystemComponentController —Main controller for this system component
parsePage()
Use this to parse your frontend page
public
abstract parsePage(Sigma $template, mixed $cmd) : mixed
You will get a template based on the content of the resolved page You can access Cx class using $this->cx To show messages, use \Message class
Parameters
- $template : Sigma
-
Template containing content of resolved page
- $cmd : mixed