class MagicDocumentHelper implements ItemInterface

Class MagicDocumentHelper

Traits

Constants

TYPE_IMAGE

TYPE_VIDEO

TYPE_FILE

TYPE_MISC

Methods

string
__toString()

No description

create(DocumentIndex $documentIndex)

No description

enableExtendedAttachmentInfo($enabled = true)

No description

array
getAttachmentInfo(bool $extendedInfo = false, bool $fullInfo = false)

Information which is relevant for a attachment document and can be transmitted to frontend without security implications

string|null
getFileExtension()

No description

string
getType()

What is the nature/type of this document

static ParameterObject
getWebserviceParameterObject()

Make this object easier to use in API

string
get_doclink_url(bool $with_domain = false) deprecated

Returns the url to the doclink

get_document_index()

Returns the document_index

Document|null
get_document_xui()

Return the xui element for the document

string|null
get_file_link(array $params = [])

Get file link

string|null
get_file_path()

Retrieves the file path for this document, in case any should exist

string
get_file_url(string $relativePathToFile = null, bool $inline_disposition = true, string $name = null, bool $zipOnTheFly = false, int $width = null, int $height = null, string $resize_mode = null, bool $resize_cache = true, string $cache_hash = null, string $absolutePathToFile = null)

Returns the url to download this file

string
get_preview_link($args = array())

Returns a link to the document opening the doc viewer

string|null
get_webdav_url()

Returns the webdav url that can be used to directly open the document belonging to this file.

bool|null
isImage()

No description

bool|null
isVideo()

No description

array
jsonSerialize()

Transforms the array structure of this option into a JSON string.

array
toArray(bool $extendedInfo = null)

No description

Details

at line 332
string __toString()

No description

Return Value

string

at line 36
static MagicDocumentHelper create(DocumentIndex $documentIndex)

No description

Parameters

DocumentIndex $documentIndex

Return Value

MagicDocumentHelper

at line 48
enableExtendedAttachmentInfo($enabled = true)

No description

Parameters

$enabled

at line 278
array getAttachmentInfo(bool $extendedInfo = false, bool $fullInfo = false)

Information which is relevant for a attachment document and can be transmitted to frontend without security implications

Parameters

bool $extendedInfo

Set to true to retrieve extended preview infos (previewInfo incl. ready state) (takes more queries to collect, shouldnt be used on large collections)

bool $fullInfo

Set to true to retrieve all edit details used by the frontend (e.g. all thumbs for videos))

Return Value

array

Exceptions

Exception

at line 199
string|null getFileExtension()

No description

Return Value

string|null

at line 224
string getType()

What is the nature/type of this document

Return Value

string

at line 341
static ParameterObject getWebserviceParameterObject()

Make this object easier to use in API

Return Value

ParameterObject

deprecated Use DocumentIndex directly

Returns the url to the doclink

Parameters

bool $with_domain

Return Value

string

The url

at line 44
DocumentIndex get_document_index()

Returns the document_index

Return Value

DocumentIndex

at line 191
Document|null get_document_xui()

Return the xui element for the document

Return Value

Document|null

The xui document implementation

Get file link

Parameters

array $params

Return Value

string|null

at line 144
string|null get_file_path()

Retrieves the file path for this document, in case any should exist

Return Value

string|null

The absolute path of the file on the server

at line 69
string get_file_url(string $relativePathToFile = null, bool $inline_disposition = true, string $name = null, bool $zipOnTheFly = false, int $width = null, int $height = null, string $resize_mode = null, bool $resize_cache = true, string $cache_hash = null, string $absolutePathToFile = null)

Returns the url to download this file

Parameters

string $relativePathToFile

Relative File Path within mod_storage

bool $inline_disposition
string $name
bool $zipOnTheFly
int $width
int $height
string $resize_mode crop
bool $resize_cache
string $cache_hash
string $absolutePathToFile

Absolute Path to file, will bypass access check

Return Value

string

The url

Returns a link to the document opening the doc viewer

Parameters

$args

Return Value

string

The link source code

at line 247
string|null get_webdav_url()

Returns the webdav url that can be used to directly open the document belonging to this file.

The webdav path will return false if the document does not implement XELOS\Modules\SystemDMS\Interfaces\FullyIntegratedInterface and thus has no file path to return an actual file. Please note, that editing is only available for native dms documents

Return Value

string|null

The webdav url of the document

at line 209
bool|null isImage()

No description

Return Value

bool|null

at line 204
bool|null isVideo()

No description

Return Value

bool|null

in ItemTrait at line 13
array jsonSerialize()

Transforms the array structure of this option into a JSON string.

Return Value

array

at line 327
array toArray(bool $extendedInfo = null)

No description

Parameters

bool $extendedInfo

Return Value

array

Exceptions

Exception