Class Controller
- Full name:
\Linchpin_SatisPress\Controller\SatisPress - Parent class:
\Linchpin_SatisPress\Controller\Controller
Methods
register_actions
Register our actions
public register_actions(): void
Inherited methods
assign
Assigns variables for substitution in templates.
public assign(string $variable, mixed $value): void
Parameters:
| Parameter | Type | Description |
|---|---|---|
$variable | string | The variable's name. |
$value | mixed | The variable's value. |
the_view
Echos the view/template
public the_view(string $file, string $view_dir = ''): void
Useful for echoing any content and also look in a local theme directory first to override templates
Parameters:
| Parameter | Type | Description |
|---|---|---|
$file | string | File to get HTML string. |
$view_dir | string | View directory. |
get_view
Returns the view.
public get_view(string $file, string $view_dir = ''): string
Useful for shortcodes, or whenever the markup needs to be returned.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$file | string | File to get HTML string. |
$view_dir | string | View directory. |
Return Value:
$html HTML output as string.
init_assignments
Reset the variables.
protected init_assignments(): void
__construct
Controller constructor.
public __construct(): mixed
register_actions
Registers the default hooks and filters.
public register_actions(): mixed