Bitrix API

Base

Table of Contents

Constants

TRANSFORM_STATUS_NO_MODULE  = 'no module'
TRANSFORM_STATUS_NOT_ALLOWED  = 'not allowed'
TRANSFORM_STATUS_SUCCESS  = 'success'
TRANSFORM_STATUS_WAS_TRANSFORMED  = 'was transformed'

Methods

__construct()  : mixed
View constructor.
className()  : mixed
getAlternativeExtensions()  : array<string|int, mixed>
Returns array of alternative extensions, that has the same mime type as main extension
getData()  : array<string|int, mixed>|null
Returns file (@see CFile::getById()).
getEditorTypeFile()  : string
Get type attribute for bb-code in html-editor
getId()  : int|null
Return ID from b_file for the viewable file.
getJsViewerAdditionalJsonParams()  : array<string|int, mixed>
Returns additional json array parameters for core_viewer.js
getJsViewerFallbackHtmlAttributeName()  : string|null
Return html-attribute for iframe viewer.
getJsViewerHeight()  : int
Returns height of popup window for core_viewer.js
getJsViewerType()  : string|null
Return type of viewer from core_viewer.js
getJsViewerWidth()  : int
Returns width of popup window for core_viewer.js
getMaxSizeTransformation()  : int
Returns maximum allowed transformation file size.
getMimeType()  : mixed
Mime-type of the view.
getName()  : string
Return name of the view.
getPreviewData()  : array<string|int, mixed>|null
Returns file (@see CFile::getById());
getPreviewExtension()  : string
Extension of the preview.
getPreviewMimeType()  : mixed
Mime-type of the preview.
getPreviewName()  : string
Returns name of the preview.
getTransformTime()  : int
Returns approximate time of transformation of the file.
getViewableExtensions()  : array<string|int, mixed>
Returns array of extensions that can be viewed.
getViewExtension()  : string
Extension of the view.
isAlwaysTransformToViewFormat()  : bool
Returns true if file should be transformed into view regardless of origin extension.
isHtmlAvailable()  : bool
Returns true if view can be rendered in some way.
isJsViewerHideEditButton()  : bool
Returns true if edit button should be hidden in js viewer.
isLastTransformationFailed()  : array<string|int, mixed>|bool
Returns true if there was an error in last transformation for this file.
isNeededLimitRightsOnTransformTime()  : bool
Returns true if we should limit rights on attached object with this file while transform in progress.
isSaveForVersion()  : bool
True if view should be saved in version as well.
isShowTransformationInfo()  : bool
Returns true if we should display message about transformation status.
isShowTransformationUpgradeMessage()  : bool
Returns true upgrade message should be shown.
isTransformationAllowed()  : bool
Returns true if transformation is allowed for this file.
isTransformationAllowedInOptions()  : bool
Is transformation allowed for this View.
isTransformationAllowedOnOpen()  : bool
Returns true if this file should be transformed on open.
render()  : string
Return html code to view file.
renderTransformationInProcessMessage()  : string
Returns html of the dummy view.
transformOnOpen()  : array<string|int, mixed>
Send command to transform file if necessary. Returns array for json response.

Constants

TRANSFORM_STATUS_NO_MODULE

public mixed TRANSFORM_STATUS_NO_MODULE = 'no module'

TRANSFORM_STATUS_NOT_ALLOWED

public mixed TRANSFORM_STATUS_NOT_ALLOWED = 'not allowed'

TRANSFORM_STATUS_SUCCESS

public mixed TRANSFORM_STATUS_SUCCESS = 'success'

TRANSFORM_STATUS_WAS_TRANSFORMED

public mixed TRANSFORM_STATUS_WAS_TRANSFORMED = 'was transformed'

Methods

__construct()

View constructor.

public __construct(string $name, int $fileId[, int $viewId = null ][, int $previewId = null ][, bool $isTransformationEnabledInStorage = true ]) : mixed
Parameters
$name : string

Name of the file.

$fileId : int

ID from b_file of the file.

$viewId : int = null

ID from b_file of the view.

$previewId : int = null

ID from b_file of the preview.

$isTransformationEnabledInStorage : bool = true

.

Tags
throws
ArgumentNullException

className()

public static className() : mixed

getAlternativeExtensions()

Returns array of alternative extensions, that has the same mime type as main extension

public static getAlternativeExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getData()

Returns file (@see CFile::getById()).

public getData() : array<string|int, mixed>|null

If there is no record - delete

Return values
array<string|int, mixed>|null

getEditorTypeFile()

Get type attribute for bb-code in html-editor

public getEditorTypeFile() : string
Return values
string

getId()

Return ID from b_file for the viewable file.

public getId() : int|null
Return values
int|null

getJsViewerAdditionalJsonParams()

Returns additional json array parameters for core_viewer.js

public getJsViewerAdditionalJsonParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getJsViewerFallbackHtmlAttributeName()

Return html-attribute for iframe viewer.

public getJsViewerFallbackHtmlAttributeName() : string|null
Return values
string|null

getJsViewerHeight()

Returns height of popup window for core_viewer.js

public getJsViewerHeight() : int
Return values
int

getJsViewerType()

Return type of viewer from core_viewer.js

public getJsViewerType() : string|null
Return values
string|null

getJsViewerWidth()

Returns width of popup window for core_viewer.js

public getJsViewerWidth() : int
Return values
int

getMaxSizeTransformation()

Returns maximum allowed transformation file size.

public getMaxSizeTransformation() : int
Return values
int

getMimeType()

Mime-type of the view.

public static getMimeType() : mixed

getName()

Return name of the view.

public getName() : string
Return values
string

getPreviewData()

Returns file (@see CFile::getById());

public getPreviewData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getPreviewExtension()

Extension of the preview.

public static getPreviewExtension() : string
Return values
string

getPreviewMimeType()

Mime-type of the preview.

public static getPreviewMimeType() : mixed

getPreviewName()

Returns name of the preview.

public getPreviewName() : string
Return values
string

getTransformTime()

Returns approximate time of transformation of the file.

public getTransformTime() : int
Return values
int

getViewableExtensions()

Returns array of extensions that can be viewed.

public static getViewableExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getViewExtension()

Extension of the view.

public static getViewExtension() : string
Return values
string

isAlwaysTransformToViewFormat()

Returns true if file should be transformed into view regardless of origin extension.

public static isAlwaysTransformToViewFormat() : bool
Return values
bool

isHtmlAvailable()

Returns true if view can be rendered in some way.

public isHtmlAvailable() : bool
Return values
bool

isJsViewerHideEditButton()

Returns true if edit button should be hidden in js viewer.

public isJsViewerHideEditButton() : bool
Return values
bool

isLastTransformationFailed()

Returns true if there was an error in last transformation for this file.

public isLastTransformationFailed() : array<string|int, mixed>|bool
Return values
array<string|int, mixed>|bool

isNeededLimitRightsOnTransformTime()

Returns true if we should limit rights on attached object with this file while transform in progress.

public isNeededLimitRightsOnTransformTime() : bool
Return values
bool

isSaveForVersion()

True if view should be saved in version as well.

public isSaveForVersion() : bool
Return values
bool

isShowTransformationInfo()

Returns true if we should display message about transformation status.

public isShowTransformationInfo() : bool
Return values
bool

isShowTransformationUpgradeMessage()

Returns true upgrade message should be shown.

public isShowTransformationUpgradeMessage() : bool
Return values
bool

isTransformationAllowed()

Returns true if transformation is allowed for this file.

public isTransformationAllowed([int $size = 0 ]) : bool
Parameters
$size : int = 0

Size of the file.

Return values
bool

isTransformationAllowedInOptions()

Is transformation allowed for this View.

public static isTransformationAllowedInOptions() : bool
Return values
bool

isTransformationAllowedOnOpen()

Returns true if this file should be transformed on open.

public isTransformationAllowedOnOpen([int $size = 0 ]) : bool
Parameters
$size : int = 0
Return values
bool

render()

Return html code to view file.

public render([array<string|int, mixed> $params = array() ]) : string
Parameters
$params : array<string|int, mixed> = array()
Return values
string

renderTransformationInProcessMessage()

Returns html of the dummy view.

public renderTransformationInProcessMessage() : string
Return values
string

transformOnOpen()

Send command to transform file if necessary. Returns array for json response.

public transformOnOpen(File $file) : array<string|int, mixed>
Parameters
$file : File
Return values
array<string|int, mixed>

        
On this page

Search results