class Link

Properties

$_view
$_page
$_cmd
$_navid
$_params
$context
$context_id
$context_counter
$dep_params

Methods

__construct(string $view = "undefined", string $page = "undefined", string $cmd = "undefined", bool $navid = false)

Link constructor.

cb_clean_arguments(string $value, string $key, array $exclude)

No description

int
check_header(mixed $curl_session, string $header_data)

Check Header

decode_special_chars(string $link_param, $decode_hash = true)

Decode Special Chars like [/,#=]

mixed
encode_link_param(string $link_param, bool $encode_hash = false)

Encode Special Chars like [/,#=]

string
getCurrentRequestURI(array $queryParams = [])

Return the current Request URI, without access checks Allows to pass custom query Params Filter XELOS a_ params from URL

string
getDomain()

Returns the current domain name with TLD.

string
getModifiedRequestURI(string $uri, array $queryParams = [])

Modify a Request URI, without access checks Allows to pass custom query Params Filter XELOS a_ params from URL

int
get_context_counter()

No description

string
get_context_hidden_field()

No description

string
get_context_id()

No description

array
get_current_link(array $args = array(), array $options = array(), string $location = 'GET')

Return Link as Ressource-Array using the parameters of the current page call

string
get_current_url(array $args = array())

No description

get_defaults()

No description

array
get_filtered_GPvars(array $GPvars, string $link_identifier)

No description

string
get_host()

Returns the host with protocol and port if is not the default port.

get_internal_url_info($url)

No description

array
get_link(array $args = array())

Return Link as Ressource-Array

string
get_url(array $args = array())

GET URL

array|false
get_url_info(string $url)

Parse URL and retrieve information

init($reset_params = true)

Init Default Vars

bool
isExternalURI(string $uri)

Is the given URL considered an external URI? Or internal (absolute with same host or relative URI)

bool
is_request_authentic()

No description

bool
is_request_secure()

No description

string
print_context_menu(array $params, array $context_links, bool $current_link = false, bool $no_js_fallback = true, bool $onMouseOver = false)

Display Context Links

string
print_context_menu_with_submenu(array $entries, bool|string $parent_menu_name = false, array $params = array())

Creates a context menu with submenus

string
print_current_link(array $args = array(), $options = array(), $location = 'GET')

Print current full HTML Link

string
print_current_url(array $args = array(), $options = array(), $location = 'GET')

Print current URL Link

string
print_link(array $args = array())

Print full HTML Link

string
print_url(array $args = array())

Print URL Link

array
replace_link_vars(array $link_array, array $variables)

No description

replace_link_vars_cb($match)

Callback used by replace_link_vars

void
send_redirect($params)

Send redirect Headers

setCurlProxyOptions(resource $curlResource)

Sets the proxy parameters for a cURL resource if they are set in the config custom.

void
set_defaults(mixed $view = false, mixed $page = false, mixed $cmd = false)

Declare Default Settings

void
set_instance_context(string $id, bool $context = false)

No description

Details

at line 63
__construct(string $view = "undefined", string $page = "undefined", string $cmd = "undefined", bool $navid = false)

Link constructor.

Parameters

string $view
string $page
string $cmd
bool $navid

at line 395
cb_clean_arguments(string $value, string $key, array $exclude)

No description

Parameters

string $value

Value

string $key

Key

array $exclude

at line 1480
int check_header(mixed $curl_session, string $header_data)

Check Header

Parameters

mixed $curl_session
string $header_data

Return Value

int

Bytes written

at line 1201
decode_special_chars(string $link_param, $decode_hash = true)

Decode Special Chars like [/,#=]

Parameters

string $link_param
$decode_hash

Encode Special Chars like [/,#=]

Parameters

string $link_param

UnEncoded RAW string

bool $encode_hash

If true a hash sign will be treated as parameter and be encoded, otherwise a hash will not be encoded and being regarded as HTML Anchor

Return Value

mixed

at line 1535
string getCurrentRequestURI(array $queryParams = [])

Return the current Request URI, without access checks Allows to pass custom query Params Filter XELOS a_ params from URL

Main Purpose for this function is to act for redirects when user is not logged in yet (e.g. for API or Auth Calls)

Parameters

array $queryParams

Return Value

string

at line 1113
string getDomain()

Returns the current domain name with TLD.

For example "xelos.net"

Return Value

string

at line 1551
string getModifiedRequestURI(string $uri, array $queryParams = [])

Modify a Request URI, without access checks Allows to pass custom query Params Filter XELOS a_ params from URL

Main Purpose for this function is to act for redirects when user is not logged in yet (e.g. for API or Auth Calls)

Parameters

string $uri
array $queryParams

Return Value

string

at line 1173
int get_context_counter()

No description

Return Value

int

at line 1155
string get_context_hidden_field()

No description

Return Value

string

HTML Form Field

at line 1164
string get_context_id()

No description

Return Value

string

Return Link as Ressource-Array using the parameters of the current page call

Parameters

array $args

Arguments in Assoc-Array, will overwrite the current arguments of the page call

array $options

Options like 'exclude'=>array('link_param','cmd')

string $location

Location determines Linkbuilding (GET [default] or GP)

Return Value

array

['label'=>'', 'target'=>'', 'class'=>'', 'title'=>'', 'href'=>'', 'full'=>''] Link Resource Array

at line 245
string get_current_url(array $args = array())

No description

Parameters

array $args

Return Value

string

at line 159
get_defaults()

No description

at line 1126
array get_filtered_GPvars(array $GPvars, string $link_identifier)

No description

Parameters

array $GPvars

GPvars Array

string $link_identifier

Link Identifier

Return Value

array

Filtered GPvars

at line 1088
string get_host()

Returns the host with protocol and port if is not the default port.

Return Value

string

at line 1218
get_internal_url_info($url)

No description

Parameters

$url

Return Link as Ressource-Array

Parameters

array $args

Params in Array Format (Typical params: label,page,cmd,class,target,title,confirm_text,tooltip,JS-FSLoader,ajax_modal,ajax_update,ajax_replace)

Return Value

array

Link Resources (Assoc Array with: label, target, class, title, href, full

Examples

$this->mod->print_link(array('label'=>$label, 'page'=>$page, 'ajax_modal'=>array('form' => 'noajax')));
$this->mod->print_link(array('label'=>$label, 'page'=>$page, 'JS-FSLoader'=>array('message' =>
'loading..','autohide'=>'5000')));

at line 234
string get_url(array $args = array())

GET URL

Parameters

array $args

Return Value

string

HTML URL

See also

\XELOS\Framework\XF\Lib\self::get_link()

at line 1285
array|false get_url_info(string $url)

Parse URL and retrieve information

Parameters

string $url

Return Value

array|false

(title, description, type, image, http_status_code)

at line 99
init($reset_params = true)

Init Default Vars

Parameters

$reset_params

at line 1576
bool isExternalURI(string $uri)

Is the given URL considered an external URI? Or internal (absolute with same host or relative URI)

Parameters

string $uri

Return Value

bool

at line 971
bool is_request_authentic()

No description

Return Value

bool

success

at line 963
bool is_request_secure()

No description

Return Value

bool

success

at line 764
string print_context_menu(array $params, array $context_links, bool $current_link = false, bool $no_js_fallback = true, bool $onMouseOver = false)

Display Context Links

Parameters

array $params

link_params

array $context_links

multi-dimensional context_links (use '-' for separator)

bool $current_link

Set to true if all links are current_links

bool $no_js_fallback

If set to FALSE these links will not be shown if JS is NOT present

bool $onMouseOver

Show Menu on Mouseover (alternate is click)

Return Value

string

HTML return link resource array

at line 818
string print_context_menu_with_submenu(array $entries, bool|string $parent_menu_name = false, array $params = array())

Creates a context menu with submenus

Parameters

array $entries

of links with Menu labels array(mainmenu_label => array(link1, link2, link3)) for a normal context menu, like print_context_menu array(mainmenu_label => array(link1, link2, submenu_label => array(link3, link4), link5))

bool|string $parent_menu_name

only used internally to create submenus

array $params

of additional params for the first dropdown: class, icon_class

return html

Return Value

string

Print current full HTML Link

Parameters

array $args
$options
$location

Return Value

string

HTML

at line 268
string print_current_url(array $args = array(), $options = array(), $location = 'GET')

Print current URL Link

Parameters

array $args
$options
$location

Return Value

string

html URL

Print full HTML Link

Parameters

array $args

= [ 'label'=>$label, 'page'=>$page, 'cmd'=>$cmd, 'class'=>'btn', 'target'=>'_new', 'title'=>$title, 'confirmtext'=>("Are you sure?"), 'JS-FSLoader'=>['message' => 'loading..', 'autohide'=>'5000'], 'ajax_modal'=>['form' => 'noajax', 'width'=> 800 ], 'ajax_update'=>$domId, 'ajax_replace'=>$domId, 'xdi' => DocumentIndex, 'xui_target' => UIAjaxComponent ]

Return Value

string

HTML Link

at line 221
string print_url(array $args = array())

Print URL Link

Parameters

array $args

Return Value

string

HTML Link

No description

Parameters

array $link_array

xfLink Array

array $variables

Associative Array (e.g. array('id'=>1)) OR Model

Return Value

array

Returns xfLink Array

Callback used by replace_link_vars

Parameters

$match

at line 859
void send_redirect($params)

Send redirect Headers

Parameters

$params

Return Value

void

at line 1495
setCurlProxyOptions(resource $curlResource)

Sets the proxy parameters for a cURL resource if they are set in the config custom.

Parameters

resource $curlResource

Resource created by curl_init

at line 147
void set_defaults(mixed $view = false, mixed $page = false, mixed $cmd = false)

Declare Default Settings

Parameters

mixed $view
mixed $page
mixed $cmd

Return Value

void

at line 172
void set_instance_context(string $id, bool $context = false)

No description

Parameters

string $id
bool $context

Link ID (e.g. module.instance.plugin)

Return Value

void