abstract class AbstractDocumentBrowser

Class AbstractDocumentBrowser

Properties

protected string $mode
protected bool $multiple
protected int $item_limit
protected bool $show_operation_options
protected bool $enable_load_more
$enable_search
protected array $allowed_file_types
protected bool $enable_context_menu
protected string $custom_operation_title
protected string[][] $confirmMessages

Methods

applyOperations(BrowserFile $item, DocumentModel $model)

Applies operation settings based on the context of the document model.

string[]
getConfirmMessages()

No description

string
get_custom_operation_title()

Returns a custom title for the operation button or null if not set.

bool
get_enable_context_menu()

Returns whether the context menu should be displayed or not.

bool
get_enable_load_more()

Returns whether more documents should be loaded on scroll.

bool
get_enable_search()

Returns whether the search should be displayed or not.

int
get_item_limit()

Returns the limit how many items should be loaded per one call.

get_items(string $id, int $offset = 0)

Returns all items for the given item identifier.

string
get_mode()

Returns the browse mode.

bool
get_multiple_selection()

Returns a boolean whether multiple items can be selected or not.

bool
get_show_operation_options()

Returns whether to show the option to set the operation for selecting item (link, move, copy).

string
get_title($item_id)

Returns a title for this browser.

handle_selection(array $item_ids, string $form_temp_path)

This method is called after the selection in the browser is submitted by the user. This method give the possibility to handle the selected files before they will be processed by further submit handling.

setConfirmMessageForCopy(string $message, int $itemId)

No description

setConfirmMessageForPassiveLink(string $message, int $itemId)

No description

setConfirmMessageForReferenceLink(string $message, int $itemId)

No description

set_allowed_file_types(array $types)

No description

set_item_limit($limit)

Sets the limit how many items should be loaded per one call.

set_mode(string $mode)

Sets the mode for display and selection of browser items. Allowed modes are folders and files.

set_multiple_selection($bool)

Sets whether multiple items can be selected or not.

set_show_operation_options($bool)

Sets whether to show the option to set the operation for selecting item (link, move, copy).

Details

at line 214
protected applyOperations(BrowserFile $item, DocumentModel $model)

Applies operation settings based on the context of the document model.

This operation may be override by the xui browser based on min reference levels requested from individual component.

Parameters

BrowserFile $item
DocumentModel $model

at line 87
string[] getConfirmMessages()

No description

Return Value

string[]

at line 56
string get_custom_operation_title()

Returns a custom title for the operation button or null if not set.

Return Value

string

at line 186
bool get_enable_context_menu()

Returns whether the context menu should be displayed or not.

Return Value

bool

at line 177
bool get_enable_load_more()

Returns whether more documents should be loaded on scroll.

Return Value

bool

Returns whether the search should be displayed or not.

Return Value

bool

at line 128
int get_item_limit()

Returns the limit how many items should be loaded per one call.

Return Value

int

at line 265
abstract AbstractBrowserItem[] get_items(string $id, int $offset = 0)

Returns all items for the given item identifier.

Parameters

string $id

Identifier of the selected item.

int $offset

An offset for limited item loading.

Return Value

AbstractBrowserItem[]

at line 108
string get_mode()

Returns the browse mode.

This returns files if the intent is to select a file of folders if the intent is to select a target folder.

Return Value

string

at line 148
bool get_multiple_selection()

Returns a boolean whether multiple items can be selected or not.

This option affects only in files mode.

Return Value

bool

at line 158
bool get_show_operation_options()

Returns whether to show the option to set the operation for selecting item (link, move, copy).

Return Value

bool

at line 274
abstract string get_title($item_id)

Returns a title for this browser.

Parameters

$item_id

Return Value

string

at line 287
handle_selection(array $item_ids, string $form_temp_path)

This method is called after the selection in the browser is submitted by the user. This method give the possibility to handle the selected files before they will be processed by further submit handling.

This method is not required and can be override by sub class.

Parameters

array $item_ids

An array contains the ids of all selected items.

string $form_temp_path

at line 80
setConfirmMessageForCopy(string $message, int $itemId)

No description

Parameters

string $message
int $itemId

No description

Parameters

string $message
int $itemId

No description

Parameters

string $message
int $itemId

at line 202
set_allowed_file_types(array $types)

No description

Parameters

array $types

at line 118
set_item_limit($limit)

Sets the limit how many items should be loaded per one call.

Parameters

$limit

at line 97
set_mode(string $mode)

Sets the mode for display and selection of browser items. Allowed modes are folders and files.

Parameters

string $mode

Available modes are files and folders.

at line 138
set_multiple_selection($bool)

Sets whether multiple items can be selected or not.

This option affects only in files mode.

Parameters

$bool

True to enable multiple item selection.

at line 168
set_show_operation_options($bool)

Sets whether to show the option to set the operation for selecting item (link, move, copy).

Parameters

$bool