Folder 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.
- addSubFolderAction() : array<string|int, mixed>|null
- Creates new folder.
- 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
- deleteTreeAction() : mixed
- disableExternalLinkAction() : mixed
- downloadArchiveAction() : Archive|null
- 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>
- getChildrenAction() : Page|null
- Returns children of folder.
- 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.
- getFullEventName() : string
- 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
- run() : HttpResponse|mixed
- setCurrentUser() : void
- setScope() : Controller
- setSourceParametersList() : Controller
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
SCOPE_AJAX
public
mixed
SCOPE_AJAX
= 'ajax'
SCOPE_CLI
public
mixed
SCOPE_CLI
= 'cli'
SCOPE_REST
public
mixed
SCOPE_REST
= 'rest'
Methods
__construct()
Constructor Controller.
public
__construct([Request|null $request = null ]) : mixed
Parameters
- $request : Request|null = null
addSubFolderAction()
Creates new folder.
public
addSubFolderAction(Folder $folder, string $name, CurrentUser $currentUser[, bool $generateUniqueName = false ]) : array<string|int, mixed>|null
Parameters
- $folder : Folder
-
Destination folder to add new folder.
- $name : string
-
Name of new folder.
- $currentUser : CurrentUser
-
Current user, autowired automatically.
- $generateUniqueName : bool = false
-
Should be true if you want to generate unique name for folder.
Tags
Return values
array<string|int, mixed>|nullclassName()
Returns the fully qualified name of this class.
public
final static className() : string
Return values
stringconfigureActions()
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
Return values
array<string|int, mixed>|mixed|stringcopyToAction()
public
copyToAction(Folder $folder, Folder $toFolder) : mixed
Parameters
- $folder : Folder
- $toFolder : Folder
deleteTreeAction()
public
deleteTreeAction(Folder $folder) : mixed
Parameters
- $folder : Folder
disableExternalLinkAction()
public
disableExternalLinkAction(Folder $folder) : mixed
Parameters
- $folder : Folder
downloadArchiveAction()
public
downloadArchiveAction(Folder $folder) : Archive|null
Parameters
- $folder : Folder
Return values
Archive|nullfinalizeResponse()
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
Return values
HttpResponse|mixedgenerateActionMethodName()
public
final generateActionMethodName(mixed $action) : string
Parameters
- $action : mixed
Return values
stringgenerateExternalLinkAction()
public
generateExternalLinkAction(Folder $folder) : mixed
Parameters
- $folder : Folder
getAction()
public
getAction(Folder $folder) : mixed
Parameters
- $folder : Folder
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
UrigetAllowedOperationsRightsAction()
public
getAllowedOperationsRightsAction(Folder $folder) : mixed
Parameters
- $folder : Folder
getAutoWiredParameters()
public
getAutoWiredParameters() : array<string|int, Parameter>
Return values
array<string|int, Parameter>getChildrenAction()
Returns children of folder.
public
getChildrenAction(Folder $folder, CurrentUser $currentUser[, string|null $search = null ][, string $searchScope = 'currentFolder' ][, bool $showRights = false ][, array<string|int, mixed> $context = [] ][, array<string|int, mixed> $order = [] ][, PageNavigation|null $pageNavigation = null ]) : Page|null
Parameters
- $folder : Folder
-
Destination folder to get children.
- $currentUser : CurrentUser
-
Current user, autowired automatically.
- $search : string|null = null
-
Search string.
- $searchScope : string = 'currentFolder'
- $showRights : bool = false
-
Should be true if you want to show rights for each element.
- $context : array<string|int, mixed> = []
-
Additional context for recognizing folderType. Necessary when user deep in folder tree.
- $order : array<string|int, mixed> = []
-
How to sort elements. For example: ['NAME' => 'ASC']
- $pageNavigation : PageNavigation|null = null
-
Autowired automatically. Describe how to slice elements.
Tags
Return values
Page|nullgetConfigurationOfActions()
public
final getConfigurationOfActions() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetCurrentUser()
public
final getCurrentUser() : CurrentUser
Return values
CurrentUsergetDefaultAutoWiredParameters()
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
ErrorgetErrors()
Getting array of errors.
public
final getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getFullEventName()
public
final static getFullEventName(mixed $eventName) : string
Parameters
- $eventName : mixed
Return values
stringgetModuleId()
Returns module id.
public
final getModuleId() : string
Tries to guess module id by file path and function @see getModuleId().
Return values
stringgetPrimaryAutoWiredParameter()
public
getPrimaryAutoWiredParameter() : Parameter|null
Return values
Parameter|nullgetRequest()
public
final getRequest() : HttpRequest
Return values
HttpRequestgetScope()
public
final getScope() : string
Return values
stringgetSourceParametersList()
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
boollistNameActions()
Returns list of all
public
final listNameActions() : array<string|int, mixed>
Return values
array<string|int, mixed>markDeletedAction()
public
markDeletedAction(Folder $folder) : mixed
Parameters
- $folder : Folder
moveToAction()
public
moveToAction(Folder $folder, Folder $toFolder) : mixed
Parameters
- $folder : Folder
- $toFolder : Folder
redirectTo()
Redirect to URL.
public
redirectTo(string $url) : Redirect
Parameters
- $url : string
Return values
RedirectrenameAction()
public
renameAction(Folder $folder, mixed $newName[, mixed $autoCorrect = false ]) : mixed
Parameters
- $folder : Folder
- $newName : mixed
- $autoCorrect : mixed = false
restoreAction()
public
restoreAction(BaseObject $folder) : mixed
Parameters
- $folder : BaseObject
run()
public
final run(mixed $actionName, array<string|int, mixed> $sourceParametersList) : HttpResponse|mixed
Parameters
- $actionName : mixed
- $sourceParametersList : array<string|int, mixed>
Tags
Return values
HttpResponse|mixedsetCurrentUser()
public
final setCurrentUser(CurrentUser $currentUser) : void
Parameters
- $currentUser : CurrentUser
setScope()
public
final setScope(string $scope) : Controller
Parameters
- $scope : string
Return values
ControllersetSourceParametersList()
public
final setSourceParametersList(array<string|int, mixed> $sourceParametersList) : Controller
Parameters
- $sourceParametersList : array<string|int, mixed>