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

Methods

string
get_custom_operation_title()

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

set_mode(string $mode)

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

string
get_mode()

Returns the browse mode.

set_item_limit($limit)

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

int
get_item_limit()

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

set_multiple_selection($bool)

Sets whether multiple items can be selected or not.

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).

set_show_operation_options($bool)

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

bool
get_enable_load_more()

Returns whether more documents should be loaded on scroll.

bool
get_enable_context_menu()

Returns whether the context menu should be displayed or not.

bool
get_enable_search()

Returns whether the search should be displayed or not.

set_allowed_file_types(array $types)

No description

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

Returns all items for the given item identifier.

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.

Details

at line 44
string get_custom_operation_title()

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

Return Value

string

at line 54
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 65
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 75
set_item_limit($limit)

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

Parameters

$limit

at line 85
int get_item_limit()

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

Return Value

int

at line 95
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 105
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 115
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 125
set_show_operation_options($bool)

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

Parameters

$bool

at line 134
bool get_enable_load_more()

Returns whether more documents should be loaded on scroll.

Return Value

bool

at line 143
bool get_enable_context_menu()

Returns whether the context menu should be displayed or not.

Return Value

bool

Returns whether the search should be displayed or not.

Return Value

bool

at line 159
set_allowed_file_types(array $types)

Parameters

array $types

at line 171
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 180
abstract string get_title($item_id)

Returns a title for this browser.

Parameters

$item_id

Return Value

string

at line 193
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