class View

View determines what page-(sub)class (or combinations of) needs to be called

Properties

array $GPvars
bool $user
array $args
protected Core $instance
protected xelos_global_template $template
protected string $ntlm_auth

Methods

bool|mixed|string
execute(array $GPvars = array())

No description

null|Template
getTemplateController($force_reload = false)

No description

string|array
get_current_cmd()

Determine current commands

string
get_current_instance()

Determine currently executed main instance

string
get_current_module()

Determine currently executed main module

int
get_current_nav_id($guess_if_unknown = false)

Determine currently viewed nav_id

string
get_current_page()

Determine currently executed Page

string
get_first_page_of_instance(string $instance_id)

No description

get_instance()

Returns the reference of the main instance.

string
get_last_page_url(bool $loop_check = true)

Returns the page the user came from (determined by referer, checked for validity)

xelos_global_template
get_primary_template()

Return the primary template object

array
get_route_params(string $route, array $raw = [])

No description

mixed
handle_special_page(Core $instance, string $page_id, array $args)

No description

bool
is_auth_method_available(mixed $auth_method)

Check if Authentication Method is available

bool
is_special_instance(string $instance_id)

Return true if the instance_id is considered special

bool
is_special_page(string $page_id)

No description

bool
is_valid_public_call(mixed $instance_id, mixed $page_id)

Check wether this is a public page valid to be called

string
load_theme_template(bool $force_reload = false)

Load currently active template or set

redirect(mixed $url = null, bool $as_cleanup = false)

Redirect user to the passed URL

redirectJS(string $url)

Redirect with JS output

void
redirect_404()

Show 404 Error Page

redirect_back(bool|string $url = false, bool $as_cleanup = false)

No description

redirect_to_login()

No description

redirect_with_delay(string $url, string $title = false, string $message = false, int $delay = 2)

Redirects the user to the passed URL after the passed delay. Shows a loader and the passed message.

string
set_current_module($mod = false)

Force currently executed main module

string|null
show_login(mixed $message = false, bool $allow_rememberme = true, bool $skip_mobile_detect = false, $extended_auth = false)

Show Login Dialog

void
show_pw_change(mixed $message)

Show Password Change Dialog

bool
show_two_factor_form(string $message = null)

Prepare and show the auth token form

show_update_page(array $update_packages, string $update_info)

No description

Details

at line 142
final bool|mixed|string execute(array $GPvars = array())

No description

Parameters

array $GPvars

Return Value

bool|mixed|string

Exceptions

Throwable

at line 1462
null|Template getTemplateController($force_reload = false)

No description

Parameters

$force_reload

Return Value

null|Template

Exceptions

Exception

at line 1751
string|array get_current_cmd()

Determine current commands

Return Value

string|array

CMD Params

at line 1735
string get_current_instance()

Determine currently executed main instance

Return Value

string

Instance Name

at line 1707
string get_current_module()

Determine currently executed main module

Return Value

string

Module Name

at line 1715
int get_current_nav_id($guess_if_unknown = false)

Determine currently viewed nav_id

Parameters

$guess_if_unknown

Return Value

int

the current Nav_ID

at line 1743
string get_current_page()

Determine currently executed Page

Return Value

string

Page Name

at line 1686
string get_first_page_of_instance(string $instance_id)

No description

Parameters

string $instance_id

instance id

Return Value

string

page or false

at line 62
Core get_instance()

Returns the reference of the main instance.

Return Value

Core

at line 1645
string get_last_page_url(bool $loop_check = true)

Returns the page the user came from (determined by referer, checked for validity)

Parameters

bool $loop_check

Return Value

string

Previous URL as string, FALSE if not available

at line 1776
xelos_global_template get_primary_template()

Return the primary template object

Return Value

xelos_global_template

at line 1042
array get_route_params(string $route, array $raw = [])

No description

Parameters

string $route

Route

array $raw

= ['instance_id'=>(string) $instance, 'page'=>(string) $page, 'cmd' => (array) $cmd] Contains unsanitized RAW values of current route

Return Value

array

((string) $instanceIDString, (string) $page, (int) $navID, (array) $cmdArgs)

at line 1164
mixed handle_special_page(Core $instance, string $page_id, array $args)

No description

Parameters

Core $instance

instance

string $page_id

page_id

array $args

Return Value

mixed

return value of the special page

Exceptions

Throwable

at line 1761
bool is_auth_method_available(mixed $auth_method)

Check if Authentication Method is available

Parameters

mixed $auth_method

Return Value

bool

at line 1125
bool is_special_instance(string $instance_id)

Return true if the instance_id is considered special

Parameters

string $instance_id

Return Value

bool

is special instance

at line 1104
bool is_special_page(string $page_id)

No description

Parameters

string $page_id

module_id

Return Value

bool

is special page

at line 1146
bool is_valid_public_call(mixed $instance_id, mixed $page_id)

Check wether this is a public page valid to be called

Parameters

mixed $instance_id
mixed $page_id

Return Value

bool

at line 1374
string load_theme_template(bool $force_reload = false)

Load currently active template or set

Parameters

bool $force_reload

Return Value

string

Current TemplateController Class with Namespace

Exceptions

Exception

at line 1478
redirect(mixed $url = null, bool $as_cleanup = false)

Redirect user to the passed URL

Parameters

mixed $url

Complete URL string (http://www....), Link array or 'default_instance'

bool $as_cleanup

Allows a request to be finished in AJAX

at line 1531
redirectJS(string $url)

Redirect with JS output

Parameters

string $url

at line 1540
void redirect_404()

Show 404 Error Page

Return Value

void

at line 1555
redirect_back(bool|string $url = false, bool $as_cleanup = false)

No description

Parameters

bool|string $url

URL if no Referer present

bool $as_cleanup

Exceptions

Exception

at line 1569
redirect_to_login()

No description

at line 1584
redirect_with_delay(string $url, string $title = false, string $message = false, int $delay = 2)

Redirects the user to the passed URL after the passed delay. Shows a loader and the passed message.

Parameters

string $url
string $title
string $message
int $delay

Delay in seconds before redirect is being executed

at line 1727
string set_current_module($mod = false)

Force currently executed main module

Parameters

$mod

Return Value

string

Module Name

at line 1244
string|null show_login(mixed $message = false, bool $allow_rememberme = true, bool $skip_mobile_detect = false, $extended_auth = false)

Show Login Dialog

Parameters

mixed $message
bool $allow_rememberme
bool $skip_mobile_detect
$extended_auth

Return Value

string|null

Login Form

at line 1352
void show_pw_change(mixed $message)

Show Password Change Dialog

Parameters

mixed $message

Return Value

void

at line 1221
bool show_two_factor_form(string $message = null)

Prepare and show the auth token form

Parameters

string $message

A message which will be displayed in the form

Return Value

bool

at line 75
show_update_page(array $update_packages, string $update_info)

No description

Parameters

array $update_packages
string $update_info