Bitrix API

File extends BaseObject

Table of Contents

Constants

ERROR_COULD_NOT_FIND_OBJECT  = 'DISK_C_22001'
ERROR_COULD_NOT_FIND_VERSION  = 'DISK_C_22005'
ERROR_COULD_NOT_UPDATE_FILE  = 'DISK_C_22006'
ERROR_REQUIRED_PARAMETER  = 'MAIN_CONTROLLER_22001'
ERROR_UNKNOWN_ACTION  = 'MAIN_CONTROLLER_22002'
EVENT_ON_AFTER_ACTION  = 'onAfterAction'
EVENT_ON_BEFORE_ACTION  = 'onBeforeAction'
EXCEPTION_UNKNOWN_ACTION  = 22002
SCOPE_AJAX  = 'ajax'
SCOPE_CLI  = 'cli'
SCOPE_REST  = 'rest'

Methods

__construct()  : mixed
Constructor Controller.
addSharingAction()  : mixed
attachPreviewAction()  : array<string|int, mixed>
className()  : string
Returns the fully qualified name of this class.
configureActions()  : array<string|int, mixed>
convertKeysToCamelCase()  : array<string|int, mixed>|mixed|string
Converts keys of array to camel case notation.
copyToAction()  : mixed
copyToMeAction()  : mixed
createByContentAction()  : mixed
deleteAction()  : mixed
disableExternalLinkAction()  : mixed
downloadAction()  : mixed
finalizeResponse()  : void
Finalizes response.
forward()  : HttpResponse|mixed
generateActionMethodName()  : string
generateExternalLinkAction()  : mixed
getAction()  : mixed
getActionUri()  : Uri
Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.
getAllowedOperationsRightsAction()  : mixed
getAutoWiredParameters()  : array<string|int, Parameter>
getConfigurationOfActions()  : array<string|int, mixed>|null
getCurrentUser()  : CurrentUser
getDefaultAutoWiredParameters()  : array<string|int, Parameter>
getErrorByCode()  : Error
Getting once error with the necessary code.
getErrors()  : array<string|int, Error>
Getting array of errors.
getExternalLinkAction()  : mixed
getFullEventName()  : string
getMetaDataForCreatedFileInUfAction()  : array<string|int, mixed>
getModuleId()  : string
Returns module id.
getPrimaryAutoWiredParameter()  : Parameter|null
getRequest()  : HttpRequest
getScope()  : string
getSourceParametersList()  : array<string|int, mixed>
getUnsignedParameters()  : mixed
isLocatedUnderPsr4()  : bool
listNameActions()  : array<string|int, mixed>
Returns list of all
markDeletedAction()  : mixed
moveToAction()  : mixed
redirectTo()  : Redirect
Redirect to URL.
renameAction()  : mixed
restoreAction()  : mixed
restoreFromVersionAction()  : mixed
run()  : HttpResponse|mixed
runPreviewGenerationAction()  : mixed
setCurrentUser()  : void
setScope()  : Controller
setSourceParametersList()  : Controller
showImageAction()  : mixed
showPreviewAction()  : mixed
showPropertiesAction()  : mixed
showSharingEntitiesAction()  : mixed
unlockAction()  : mixed

Constants

ERROR_COULD_NOT_FIND_OBJECT

public mixed ERROR_COULD_NOT_FIND_OBJECT = 'DISK_C_22001'

ERROR_COULD_NOT_FIND_VERSION

public mixed ERROR_COULD_NOT_FIND_VERSION = 'DISK_C_22005'

ERROR_COULD_NOT_UPDATE_FILE

public mixed ERROR_COULD_NOT_UPDATE_FILE = 'DISK_C_22006'

ERROR_REQUIRED_PARAMETER

public mixed ERROR_REQUIRED_PARAMETER = 'MAIN_CONTROLLER_22001'

ERROR_UNKNOWN_ACTION

public mixed ERROR_UNKNOWN_ACTION = 'MAIN_CONTROLLER_22002'

EVENT_ON_AFTER_ACTION

public mixed EVENT_ON_AFTER_ACTION = 'onAfterAction'

EVENT_ON_BEFORE_ACTION

public mixed EVENT_ON_BEFORE_ACTION = 'onBeforeAction'

EXCEPTION_UNKNOWN_ACTION

public mixed EXCEPTION_UNKNOWN_ACTION = 22002

Methods

__construct()

Constructor Controller.

public __construct([Request|null $request = null ]) : mixed
Parameters
$request : Request|null = null

addSharingAction()

public addSharingAction(File $file, mixed $entity, mixed $taskName) : mixed
Parameters
$file : File
$entity : mixed
$taskName : mixed

attachPreviewAction()

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

className()

Returns the fully qualified name of this class.

public final static className() : string
Return values
string

configureActions()

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

convertKeysToCamelCase()

Converts keys of array to camel case notation.

public convertKeysToCamelCase(mixed $data) : array<string|int, mixed>|mixed|string
Parameters
$data : mixed

Data.

Tags
see
Converter::OUTPUT_JSON_FORMAT
Return values
array<string|int, mixed>|mixed|string

copyToAction()

public copyToAction(File $file, Folder $toFolder) : mixed
Parameters
$file : File
$toFolder : Folder

copyToMeAction()

public copyToMeAction(File $file) : mixed
Parameters
$file : File

createByContentAction()

public createByContentAction(Folder $folder, mixed $filename, TmpFile $content[, mixed $generateUniqueName = false ]) : mixed
Parameters
$folder : Folder
$filename : mixed
$content : TmpFile
$generateUniqueName : mixed = false

deleteAction()

public deleteAction(File $file) : mixed
Parameters
$file : File

disableExternalLinkAction()

public disableExternalLinkAction(File $file) : mixed
Parameters
$file : File

downloadAction()

public downloadAction(File $file) : mixed
Parameters
$file : File

finalizeResponse()

Finalizes response.

public finalizeResponse(Response $response) : void

The method will be invoked when HttpApplication will be ready to send response to client. It's a final place where Controller can interact with response.

Parameters
$response : Response

forward()

public forward(Controller|string $controller, string $actionName[, array<string|int, mixed>|null $parameters = null ]) : HttpResponse|mixed
Parameters
$controller : Controller|string
$actionName : string
$parameters : array<string|int, mixed>|null = null
Tags
throws
SystemException
Return values
HttpResponse|mixed

generateActionMethodName()

public final generateActionMethodName(mixed $action) : string
Parameters
$action : mixed
Return values
string

generateExternalLinkAction()

public generateExternalLinkAction(File $file) : mixed
Parameters
$file : File

getAction()

public getAction(File $file) : mixed
Parameters
$file : File

getActionUri()

Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.

public final getActionUri(string $actionName[, array<string|int, mixed> $params = [] ][, bool $absolute = false ]) : Uri
Parameters
$actionName : string

Action name. It's a relative action name without controller name.

$params : array<string|int, mixed> = []

Parameters for creating uri.

$absolute : bool = false
Return values
Uri

getAllowedOperationsRightsAction()

public getAllowedOperationsRightsAction(File $file) : mixed
Parameters
$file : File

getConfigurationOfActions()

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

getDefaultAutoWiredParameters()

public final getDefaultAutoWiredParameters() : array<string|int, Parameter>
Return values
array<string|int, Parameter>

getErrorByCode()

Getting once error with the necessary code.

public final getErrorByCode(string $code) : Error
Parameters
$code : string

Code of error.

Return values
Error

getErrors()

Getting array of errors.

public final getErrors() : array<string|int, Error>
Return values
array<string|int, Error>

getExternalLinkAction()

public getExternalLinkAction(File $file) : mixed
Parameters
$file : File

getFullEventName()

public final static getFullEventName(mixed $eventName) : string
Parameters
$eventName : mixed
Return values
string

getMetaDataForCreatedFileInUfAction()

public getMetaDataForCreatedFileInUfAction(File $file) : array<string|int, mixed>
Parameters
$file : File
Tags
throws
ArgumentTypeException
Return values
array<string|int, mixed>

getModuleId()

Returns module id.

public final getModuleId() : string

Tries to guess module id by file path and function @see getModuleId().

Return values
string

getPrimaryAutoWiredParameter()

public getPrimaryAutoWiredParameter() : Parameter|null
Return values
Parameter|null

getRequest()

public final getRequest() : HttpRequest
Return values
HttpRequest

getScope()

public final getScope() : string
Return values
string

getSourceParametersList()

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

getUnsignedParameters()

public final getUnsignedParameters() : mixed

isLocatedUnderPsr4()

public final isLocatedUnderPsr4() : bool
Return values
bool

listNameActions()

Returns list of all

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

markDeletedAction()

public markDeletedAction(File $file) : mixed
Parameters
$file : File

moveToAction()

public moveToAction(File $file, Folder $toFolder) : mixed
Parameters
$file : File
$toFolder : Folder

renameAction()

public renameAction(File $file, mixed $newName[, mixed $autoCorrect = false ]) : mixed
Parameters
$file : File
$newName : mixed
$autoCorrect : mixed = false

restoreAction()

public restoreAction(File $file) : mixed
Parameters
$file : File

restoreFromVersionAction()

public restoreFromVersionAction(File $file, Version $version) : mixed
Parameters
$file : File
$version : Version

run()

public final run(mixed $actionName, array<string|int, mixed> $sourceParametersList) : HttpResponse|mixed
Parameters
$actionName : mixed
$sourceParametersList : array<string|int, mixed>
Tags
throws
SystemException
Return values
HttpResponse|mixed

runPreviewGenerationAction()

public runPreviewGenerationAction(File $file) : mixed
Parameters
$file : File

setSourceParametersList()

public final setSourceParametersList(array<string|int, mixed> $sourceParametersList) : Controller
Parameters
$sourceParametersList : array<string|int, mixed>
Return values
Controller

showImageAction()

public showImageAction(File $file[, mixed $width = 0 ][, mixed $height = 0 ][, mixed $exact = null ]) : mixed
Parameters
$file : File
$width : mixed = 0
$height : mixed = 0
$exact : mixed = null

showPreviewAction()

public showPreviewAction(File $file[, mixed $width = 0 ][, mixed $height = 0 ][, mixed $exact = null ]) : mixed
Parameters
$file : File
$width : mixed = 0
$height : mixed = 0
$exact : mixed = null

showPropertiesAction()

public showPropertiesAction(File $file) : mixed
Parameters
$file : File

showSharingEntitiesAction()

public showSharingEntitiesAction(File $file) : mixed
Parameters
$file : File

unlockAction()

public unlockAction(File $file) : mixed
Parameters
$file : File

        
On this page

Search results