class CrmDocumentBrowser extends AbstractDocumentBrowser

Class GroupsDocumentBrowser

Properties

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

Methods

__construct(xm_crm $mod)

CrmDocumentBrowser constructor.

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)

No description

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 26
__construct(xm_crm $mod)

CrmDocumentBrowser constructor.

Parameters

xm_crm $mod

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

string[] getConfirmMessages()

No description

Return Value

string[]

string get_custom_operation_title()

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

Return Value

string

bool get_enable_context_menu()

Returns whether the context menu should be displayed or not.

Return Value

bool

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

int get_item_limit()

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

Return Value

int

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

No description

Parameters

string $id

Identifier of the selected item.

int $offset

An offset for limited item loading.

Return Value

AbstractBrowserItem[]

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

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

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 95
string get_title($item_id)

Returns a title for this browser.

Parameters

$item_id

Return Value

string

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

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

set_allowed_file_types(array $types)

No description

Parameters

array $types

set_item_limit($limit)

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

Parameters

$limit

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.

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.

set_show_operation_options($bool)

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

Parameters

$bool