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

string
getDefaultPageUrl()

Returns the default page url for the current user

Template|null
getTemplateController(bool $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, $useRawArgsFromRoute = true)

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(string|null $errorMessage = null)

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

show_update_page(array $update_packages, string $update_info)

No description

Details

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

No description

Parameters

array $GPvars

Return Value

bool|mixed|string

Exceptions

Throwable

at line 1730
string getDefaultPageUrl()

Returns the default page url for the current user

Return Value

string

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

No description

Parameters

bool $force_reload

Return Value

Template|null

Exceptions

Exception

at line 1830
string|array get_current_cmd()

Determine current commands

Return Value

string|array

CMD Params

at line 1814
string get_current_instance()

Determine currently executed main instance

Return Value

string

Instance Name

at line 1786
string get_current_module()

Determine currently executed main module

Return Value

string

Module Name

at line 1794
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 1822
string get_current_page()

Determine currently executed Page

Return Value

string

Page Name

at line 1765
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 66
Core get_instance()

Returns the reference of the main instance.

Return Value

Core

at line 1685
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 1855
xelos_global_template get_primary_template()

Return the primary template object

Return Value

xelos_global_template

at line 1070
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 1192
mixed handle_special_page(Core $instance, string $page_id, array $args, $useRawArgsFromRoute = true)

No description

Parameters

Core $instance instance
string $page_id page_id
array $args
$useRawArgsFromRoute

Return Value

mixed

return value of the special page

Exceptions

Throwable

at line 1840
bool is_auth_method_available(mixed $auth_method)

Check if Authentication Method is available

Parameters

mixed $auth_method

Return Value

bool

at line 1153
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 1132
bool is_special_page(string $page_id)

No description

Parameters

string $page_id module_id

Return Value

bool

is special page

at line 1174
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 1390
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 1493
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 1553
redirectJS(string $url)

Redirect with JS output

Parameters

string $url

at line 1565
void redirect_404(string|null $errorMessage = null)

Show 404 Error Page

Parameters

string|null $errorMessage

Add custom error message to page

Return Value

void

at line 1590
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 1604
redirect_to_login()

No description

at line 1619
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 1806
string set_current_module($mod = false)

Force currently executed main module

Parameters

$mod

Return Value

string

Module Name

at line 1253
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 1367
void show_pw_change(mixed $message)

Show Password Change Dialog

Parameters

mixed $message

Return Value

void

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

No description

Parameters

array $update_packages
string $update_info