SatisPress

Last updatedView as Markdown

Class 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:

ParameterTypeDescription
$variablestringThe variable's name.
$valuemixedThe 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:

ParameterTypeDescription
$filestringFile to get HTML string.
$view_dirstringView 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:

ParameterTypeDescription
$filestringFile to get HTML string.
$view_dirstringView 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

Have a question about this page?

Linchpin assistant

Was this helpful?