class UI

Class UI

Traits

Trait ObjectManager XELOS Framework

Properties

protected array $object_cache Each object created by a success call of __call or __get will be saved into this property to avoid a multiple creation of same objects and minimize performance loss. If the multiple creation of objects is desirable e.g. in factory classes, the caching can be disabled by setting xf_trait::factory_mode to true. from ObjectManager
protected array[] $registry The instantiation of a requested object can be processed only if the class of the object is registered with the class name as key and its information as array in this property. The element should have at least the class name or the relative path to "class" folder. from ObjectManager
protected string $lib_class_dir This property contains the path to the folder served as root for all requested classes. This folder can contains other folder or classes. All requested and registered classes will be searched in this folder by concating this path with the relative path defined in the registration of the requested class. If the class is not included it will be done on the fly. from ObjectManager
protected string $lib_class_prefix An optional possibility to pretend a prefix for all registered classes. from ObjectManager
protected string $ns_class_prefix An optional possibility to pretend a namespace prefix for classes have no namespace yet. from ObjectManager
protected bool $factory_mode This property effects the object cache. By default it is set to false to enable the object cache for all requested objects. If this property is set true, the object cache will be disabled. from ObjectManager
protected array $injection_objects This is an assoc array and contains objects that will be injected into each requested object. Each containing object will be injected by the name of the key. E.g. ['mod' => $object] this would inject the property named mod with the value of $object. from ObjectManager
protected bool $auto_init This property controls if the init method of requested objects is called by this trait or not. from ObjectManager
bool $use_js
array $flash_messages
protected array $js_blocks
protected array $js_files
protected array $associated_content
protected array $css_files
protected array $css_files_meta
$admin_links
$admin_link_instances
$primary_admin_links
$template_links
$feed_links
static array $used_uids
Html $html

Methods

Carousel
Carousel()

No description

mixed
__call($class, $args)

Magic method.

__construct()

UI constructor.

mixed
__get($class)

Magic method.

bool
__isset($property)

Magic method.

__set($name, $value)

Magic method.

add_admin_link(array $link_params)

No description

add_admin_link_for_instance($instance_id)

Shows passed instance's admin links as additional links in admin bar

add_css_file(string $file, string $position = 'bottom', string $media = null, string $if_condition = null)

No description

add_feed_link(array $params = array(), Core $mod = null)

No description

add_i18n_js()

No description

add_js_block(string $js)

No description

add_js_file(string $file, string $position = 'bottom')

No description

add_primary_admin_link($link_params)

No description

add_template_link($templatefile, $custom)

No description

admin_message(string $message, string $type = 'note', bool|int $expires_at = false, bool $uid = false)

Stores the passed message as admin message until the message expires or is marked read

Amchart
amchart($link_id = false)

No description

catch_before_redirect()

Is being triggered before the page get's redirected

clear_css_files()

No description

clear_js_files()

No description

string
convert_www_to_hdd_path(string $web_path)

Converts a ressourc web path to the local hdd path

flash_message(string $message, string $type = 'note')

Stores the passed message as flash message until the next page call

string
getClassShortForNs(string $ns)

Returns the Classname from a given Namespace.

string
getCssClassForNs(string $ns, bool $legacy = false)

Builds a css class for the given Namespace like [vendor]-[module]-[name] e.g.: blueend-ui-carousel

getCssClassForObject($object, $legacy = false)

No description

get_admin_bar()

No description

array
get_admin_messages($clear_id = false)

Returns array of admin messages

array|bool
get_associated_content()

Get Associated Content (for SPDY Push)

array
get_css_files(bool $convert_less = false)

No description

get_css_files_meta()

No description

get_feed_links_meta()

No description

get_flash_message_html()

Returns a pre-rendered flash message output and clears messages from flash list

array
get_flash_messages(bool $clear = true)

Returns array of flash messages

string
get_js_blocks(bool $clear = true)

No description

get_js_blocks_raw($clear = true)

No description

get_js_files()

No description

string
get_js_files_base()

No description

array
get_js_files_base_files(bool $files_only = false)

Get JS Files

get_js_files_meta()

No description

string
get_last_js_block(bool $clear = true)

Return last JS Block and remove from array

array
get_less_variable_files()

Get LESS variable files

string
get_lib_class_dir()

Returns the path to class directory.

string
get_lib_class_prefix()

Returns the defined prefix for all classes.

array
get_object_cache()

Returns an array containing all objects were requested.

string
get_unique_dom_id(bool $true_random = false, string $uid_prefix = null)

No description

string
get_unique_string(string $string = 'unique', string $context = 'default', array $prefill = array())

No description

init()

No description

init_ui()

Initilized before VIEW execution with Event Trigger, Restore session values

AjaxContainer
new_ajax_container($id)

No description

Breadcrumb
new_breadcrumb($link_id = false)

No description

Calendar
new_calendar()

No description

Chart
new_chart($id = false, $options = array())

No description

Container
new_container($link_id = false)

No description

DocLink
new_doclink($document_index_id = false, $displaystyle = null)

No description

DocumentLock
new_document_lock()

No description

Faceted
new_faceted($link_id = false)

No description

Form
new_form($options_or_name = null)

No description

FormEditor
new_form_editor($form_name, $field_name = null)

No description

Image
new_image($param_array = array())

No description

ImageEdit
new_image_edit()

No description

Import
new_import($name)

No description

InPlaceEditor
new_in_place_editor()

No description

InlineEditor
new_inline_editor($link_id = false)

No description

ItemList
new_item_list()

No description

Js
new_js()

No description

Link
new_link($xf_link_array = array())

No description

Paging
new_paging($record_count, $records_per_page, $uid = false, $record_start = false)

No description

ProgressBar
new_progress_bar($link_id = false)

No description

QRCode
new_qrcode($qr_content = null)

No description

Table
new_table($table_id = false, $table_attributes = array())

No description

TableEditor
new_table_editor($sql_table = false, $fields = false, $params = false, $override = false, $table_id = false)

No description

Tabs
new_tabs($uid = false)

No description

TimeLine
new_timeline()

No description

Tree
new_tree($uniqueid = false)

No description

UserLink
new_userlink($user_id)

No description

Wizard
new_wizard($wizardID = false, $defaultStep = 1)

No description

reset()

Resets all internal counters (e.g. DOM ID references)

string|void
set_associated_content(string $resource)

Set Associated Content (for SPDY Push)

set_injection_objects(array $objects)

Add given objects to injection object list that will be inject into object by magic call. The array should consists of property name as key and object as value.

set_lib_class_dir($lib_class_dir)

Sets the directory where classes are stored.

set_lib_class_prefix($lib_class_prefix)

Sets the class name prefix.

unshift_js_block($js)

No description

xelos_object_manager_init(bool $lib_class_dir, string $lib_class_prefix = '', string $ns_prefix = '')

trait constructor This method have to be called from constructor of each class that uses this trait.

Details

Return Value

Carousel

in ObjectManager at line 249
mixed __call($class, $args)

Magic method.

Returns the requested object. If the object is not cached, it will be instantiated with given arguments. This method calls xf_trait::get_object.

Parameters

$class
$args

Return Value

mixed

at line 121
__construct()

UI constructor.

in ObjectManager at line 231
mixed __get($class)

Magic method.

First it checks if the requested property is defined and returns it if null. If not defined of null, it calls xf_trait::get_object and returns its return value.

Parameters

$class

Return Value

mixed

in ObjectManager at line 199
bool __isset($property)

Magic method.

This method checks whether the property is defined or injected by __set. If not injected or defined, it will check the registry for an entry of requested property.

Parameters

$property

Return Value

bool

in ObjectManager at line 219
__set($name, $value)

Magic method.

Sets the given value by $name

Parameters

$name
$value

Parameters

array $link_params XF Link Array or Rendered HTML Link

Shows passed instance's admin links as additional links in admin bar

Parameters

$instance_id

at line 259
add_css_file(string $file, string $position = 'bottom', string $media = null, string $if_condition = null)

Parameters

string $file Filename (absolute webpath e.g. /wwwres/my.css)
string $position Position where to insert (bottom, top)
string $media Media (Screen, Print, Handheld)
string $if_condition IF Condition (e.g. 'IE 7' -> Only load this file for IE7)

Parameters

array $params XF Link Params, include title as caption
Core $mod Link to module controller object

at line 338
add_i18n_js()

at line 401
add_js_block(string $js)

Parameters

string $js JS Code Block

at line 308
add_js_file(string $file, string $position = 'bottom')

Parameters

string $file JS filename (absolute webpath e.g. /wwwres/my.js)
string $position Position where to insert (bottom, top)

Parameters

$link_params

Parameters

$templatefile
$custom

at line 186
admin_message(string $message, string $type = 'note', bool|int $expires_at = false, bool $uid = false)

Stores the passed message as admin message until the message expires or is marked read

Parameters

string $message Message to display
string $type Message type, Default Types: notice, error, success, access
bool|int $expires_at UnixTimestamp to indicate expiry date
bool $uid

at line 78
Amchart amchart($link_id = false)

Parameters

$link_id

Return Value

Amchart

at line 149
catch_before_redirect()

Is being triggered before the page get's redirected

at line 504
clear_css_files()

at line 507
clear_js_files()

at line 875
string convert_www_to_hdd_path(string $web_path)

Converts a ressourc web path to the local hdd path

Parameters

string $web_path Web Path (e.g. /wwwres/style.css)

Return Value

string HDD Path (e.g. /server/xelos/wwwres/style.css)

at line 159
flash_message(string $message, string $type = 'note')

Stores the passed message as flash message until the next page call

Parameters

string $message Message to display
string $type Message type, Default Types: notice, error, success, access

at line 1585
string getClassShortForNs(string $ns)

Returns the Classname from a given Namespace.

XELOS\Framework\Module\UI -> ui \Something\Else -> else \Something\Completely\Different\ -> different xui_carousel -> xui_carousel

Parameters

string $ns The Namespace

Return Value

string The lowercase class name

Exceptions

Exception

at line 1609
string getCssClassForNs(string $ns, bool $legacy = false)

Builds a css class for the given Namespace like [vendor]-[module]-[name] e.g.: blueend-ui-carousel

Parameters

string $ns The Namespace
bool $legacy Build old class names

Return Value

string The CSS class

Exceptions

Exception

at line 1597
getCssClassForObject($object, $legacy = false)

Parameters

$object
$legacy

at line 1048
get_admin_bar()

at line 203
array get_admin_messages($clear_id = false)

Returns array of admin messages

Parameters

$clear_id

Return Value

array

at line 516
array|bool get_associated_content()

Get Associated Content (for SPDY Push)

Return Value

array|bool

at line 430
array get_css_files(bool $convert_less = false)

Parameters

bool $convert_less Should less files converted to css?

Return Value

array

at line 456
get_css_files_meta()

at line 228
get_flash_message_html()

Returns a pre-rendered flash message output and clears messages from flash list

at line 172
array get_flash_messages(bool $clear = true)

Returns array of flash messages

Parameters

bool $clear

Return Value

array

at line 1388
string get_js_blocks(bool $clear = true)

Parameters

bool $clear

Return Value

string

at line 1355
get_js_blocks_raw($clear = true)

Parameters

$clear

at line 418
get_js_files()

at line 691
string get_js_files_base()

Return Value

string HTML Tags (