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($link_param, $decode_hash = true)

Decode Special Chars like [/,#=]

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

Encode Special Chars like [/,#=]

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

get_filtered_GPvars(array $GPvars, string $link_identifier)

No description

get_host()

No description

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
get_url_info(string $url)

Parse URL and retrieve information

init($reset_params = true)

Init Default Vars

is_request_authentic()

No description

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($args = array(), $options = array(), $location = 'GET')

Print current full HTML Link

string
print_current_url($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 388
cb_clean_arguments(string $value, string $key, array $exclude)

Parameters

string $value Value
string $key Key
array $exclude

at line 1471
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 1196
decode_special_chars($link_param, $decode_hash = true)

Decode Special Chars like [/,#=]

Parameters

$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 1168
int get_context_counter()

Return Value

int

at line 1150
string get_context_hidden_field()

Return Value

string HTML Form Field

at line 1159
string get_context_id()

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 238
string get_current_url(array $args = array())

Parameters

array $args

Return Value

string

at line 152
get_defaults()

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

Parameters

array $GPvars GPvars Array
string $link_identifier Link Identifier

at line 1097
get_host()

at line 1213
get_internal_url_info($url)

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

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

GET URL

Parameters

array $args

Return Value

string HTML URL

See also

Link::get_link

at line 1280
array get_url_info(string $url)

Parse URL and retrieve information

Parameters

string $url

Return Value

array (title, description, type, image, http_status_code)

at line 110
init($reset_params = true)

Init Default Vars

Parameters

$reset_params

at line 954
is_request_authentic()

at line 946
is_request_secure()

at line 747
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 801
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

$args
$options
$location

Return Value

string HTML

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

Print current URL Link

Parameters

$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, 'confirm_text'=>("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 214
string print_url(array $args = array())

Print URL Link

Parameters

array $args

Return Value

string HTML Link

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 842
void send_redirect($params)

Send redirect Headers

Parameters

$params

Return Value

void

at line 1486
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 140
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 165
void set_instance_context(string $id, bool $context = false)

Parameters

string $id
bool $context Link ID (e.g. module.instance.plugin)

Return Value

void