Webdav extends Module
Disk storage volume measurement class.
Table of Contents
Constants
- ATTACHED_OBJECT = 'attached_object'
- CRM_OBJECT = 'crm_object'
- DISK_FILE = 'disk_file'
- ERROR_LOCK_TIMEOUT = 'LOCK_TIMEOUT'
- ERROR_MEASURE_UNAVAILABLE = 'DISK_VOLUME_MEASURE_UNAVAILABLE'
- EXTERNAL_LINK = 'external_link'
- PREVIEW_FILE = 'preview_file'
- SHARING_OBJECT = 'sharing_object'
- UNNECESSARY_VERSION = 'unnecessary_version'
Properties
- $clearConstraintList : array<string|int, string>
- $clearFolderConstraintList : array<string|int, string>
- $deleteConstraintList : array<string|int, string>
- $indicatorTypeList : array<string|int, mixed>
Methods
- addError() : void
- Upends stack of errors.
- addFilter() : static
- Sets filter parameters.
- addGroupBy() : static
- Sets group by field.
- addSelect() : static
- Sets select field.
- className() : string
- clearErrors() : void
- Empty stack of errors.
- getAttachedEntityList() : array<string|int, string>
- Returns entity list attached to disk object corresponding to module.
- getCorrespondingFileList() : Result
- Loads file list corresponding to indicator's filter.
- getCorrespondingFolderList() : Result
- Loads folder list corresponding to indicator's filter.
- getCorrespondingUnnecessaryVersionList() : Result
- Loads file list corresponding to indicator's filter.
- getDiskCount() : float
- Returns total amount of objects on disk.
- getDiskSize() : float
- Returns total volume size of objects on disk.
- getEntityList() : array<string|int, string>
- Returns entity user field list corresponding to module.
- getEntityType() : array<string|int, string>
- Returns entity type list.
- getErrorByCode() : Error|null
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- getErrorsByCode() : array<string|int, Error>
- Getting array of errors with the necessary code.
- getFilter() : array<string|int, mixed>
- Gets filter parameters.
- getFilterId() : int
- Gets stored filter id.
- getFilterValue() : mixed|null
- Gets filter parameter by key.
- getFolderList() : array<string|int, Folder>|array<string|int, mixed>
- Returns folder list corresponding to module.
- getFragment() : Fragment
- Finds entity object by filter.
- getGroupBy() : array<string|int, mixed>
- Gets group by fields.
- getIblockList() : array<string|int, mixed>
- Returns iblock list corresponding to module.
- getIndicator() : IVolumeIndicator
- Constructs and returns indicator type object.
- getIndicatorId() : string
- getLimit() : int
- Gets limit result rows count.
- getMeasurementResult() : Result
- Returns calculation result set.
- getMeasureStages() : array<string|int, string>
- Returns measure process stages list.
- getModuleId() : string
- Returns module identifier.
- getOffset() : int
- Gets offset in result.
- getOrder() : array<string|int, mixed>
- Gets sort order parameters.
- getOwner() : int|null
- Gets owner id.
- getPreviewCount() : float
- Returns total amount of preview files.
- getPreviewSize() : float
- Returns total volume size of preview files.
- getSelect() : array<string|int, mixed>
- Gets select fields.
- getSpecialFolderCode() : array<string|int, string>
- Returns special folder code list.
- getSpecialFolderXmlId() : array<string|int, string>
- Returns special folder xml_id code list.
- getSpecific() : array<string|int, mixed>
- Returns entity specific corresponding to module.
- getStage() : string|null
- Gets current stage id.
- getStorageList() : array<string|int, Storage>|array<string|int, mixed>
- Returns module corresponding to module.
- getTitle() : string|null
- Returns title of the entity object.
- getTotalAttached() : float
- Returns total amount of attached objects selecting by filter.
- getTotalCount() : float
- Returns total amount of objects selecting by filter.
- getTotalLink() : float
- Returns total amount of external links to objects selecting by filter.
- getTotalSharing() : float
- Returns total number sharing of objects selecting by filter.
- getTotalSize() : float
- Returns total volume size of objects selecting by filter.
- getTotalVersion() : float
- Returns total amount of objects selecting by filter.
- getUnnecessaryVersionCount() : float
- Returns total count of files without links and attached object.
- getUnnecessaryVersionSize() : int
- Returns total amount of files without links and attached object.
- getUpdateTime() : DateTime|null
- Returns last update time of the entity object.
- getUserTypeFieldList() : array<string|int, mixed>
- Returns list of user fields corresponding to entity.
- hasErrors() : bool
- Tells true if error have happened.
- isMeasureAvailable() : bool
- Returns true if module installed and available to measure.
- isResultAvailable() : bool
- Tells true if total result is available.
- listClearConstraint() : array<string|int, string>
- Returns clearance constraint list.
- listClearFolderConstraint() : array<string|int, string>
- Returns clearance constraint list.
- listDeleteConstraint() : array<string|int, string>
- Returns delete constraint list.
- listIndicator() : array<string|int, mixed>
- Returns indicator list available in library.
- loadTotals() : array<string|int, float>
- Returns total amount of objects selecting by filter.
- measure() : static
- Runs measure test to get volumes of selecting objects.
- prepareData() : static
- Preforms data preparation.
- purify() : static
- Deletes objects selecting by filter.
- recalculatePercent() : static
- Recalculates percent from total file size per row selected by filter.
- resetMeasurementResult() : static
- Unset calculated values.
- restoreFilter() : static
- Restores filter state from saved $measurement result.
- setFilterId() : static
- Sets filter id.
- setLimit() : static
- Sets limit result rows count.
- setOffset() : static
- Sets offset in result.
- setOrder() : static
- Sets sort order parameters.
- setOwner() : static
- Sets owner id.
- setStage() : static
- Sets current stage id.
- unsetFilter() : static
- Clear filter parameters.
Constants
ATTACHED_OBJECT
public
mixed
ATTACHED_OBJECT
= 'attached_object'
CRM_OBJECT
public
mixed
CRM_OBJECT
= 'crm_object'
DISK_FILE
public
mixed
DISK_FILE
= 'disk_file'
ERROR_LOCK_TIMEOUT
public
mixed
ERROR_LOCK_TIMEOUT
= 'LOCK_TIMEOUT'
ERROR_MEASURE_UNAVAILABLE
public
mixed
ERROR_MEASURE_UNAVAILABLE
= 'DISK_VOLUME_MEASURE_UNAVAILABLE'
EXTERNAL_LINK
public
mixed
EXTERNAL_LINK
= 'external_link'
PREVIEW_FILE
public
mixed
PREVIEW_FILE
= 'preview_file'
SHARING_OBJECT
public
mixed
SHARING_OBJECT
= 'sharing_object'
UNNECESSARY_VERSION
public
mixed
UNNECESSARY_VERSION
= 'unnecessary_version'
Properties
$clearConstraintList
public
static array<string|int, string>
$clearConstraintList
= []
Clear constraint list.
$clearFolderConstraintList
public
static array<string|int, string>
$clearFolderConstraintList
= []
Clear folder constraint list.
$deleteConstraintList
public
static array<string|int, string>
$deleteConstraintList
= []
Delete constraint list.
$indicatorTypeList
public
static array<string|int, mixed>
$indicatorTypeList
= []
Indicator list available in library.
Methods
addError()
Upends stack of errors.
public
addError(Error $error) : void
Parameters
- $error : Error
-
Error message object.
addFilter()
Sets filter parameters.
public
addFilter(string $key, string|array<string|int, string> $value) : static
Parameters
- $key : string
-
Parameter name to filter.
- $value : string|array<string|int, string>
-
Parameter value.
Return values
staticaddGroupBy()
Sets group by field.
public
addGroupBy(string $alias, string $statement) : static
Parameters
- $alias : string
-
Parameter alias.
- $statement : string
-
Parameter value.
Tags
Return values
staticaddSelect()
Sets select field.
public
addSelect(string $alias, string $statement) : static
Parameters
- $alias : string
-
Parameter alias.
- $statement : string
-
Parameter value.
Tags
Return values
staticclassName()
public
final static className() : string
Return values
string —the fully qualified name of this class.
clearErrors()
Empty stack of errors.
public
clearErrors() : void
getAttachedEntityList()
Returns entity list attached to disk object corresponding to module.
public
getAttachedEntityList() : array<string|int, string>
Return values
array<string|int, string>getCorrespondingFileList()
Loads file list corresponding to indicator's filter.
public
getCorrespondingFileList([array<string|int, mixed> $additionalFilter = [] ]) : Result
Parameters
- $additionalFilter : array<string|int, mixed> = []
-
Additional parameters to filter file list.
Return values
ResultgetCorrespondingFolderList()
Loads folder list corresponding to indicator's filter.
public
getCorrespondingFolderList([array<string|int, mixed> $additionalFilter = [] ]) : Result
Parameters
- $additionalFilter : array<string|int, mixed> = []
-
Additional parameters to filter file list.
Return values
ResultgetCorrespondingUnnecessaryVersionList()
Loads file list corresponding to indicator's filter.
public
getCorrespondingUnnecessaryVersionList([array<string|int, mixed> $additionalFilter = [] ]) : Result
Parameters
- $additionalFilter : array<string|int, mixed> = []
-
Additional parameters to filter file list.
Return values
ResultgetDiskCount()
Returns total amount of objects on disk.
public
getDiskCount() : float
Return values
floatgetDiskSize()
Returns total volume size of objects on disk.
public
getDiskSize() : float
Return values
floatgetEntityList()
Returns entity user field list corresponding to module.
public
getEntityList() : array<string|int, string>
Return values
array<string|int, string>getEntityType()
Returns entity type list.
public
static getEntityType() : array<string|int, string>
Return values
array<string|int, string>getErrorByCode()
Getting once error with the necessary code.
public
getErrorByCode(string $code) : Error|null
Parameters
- $code : string
-
Code of error.
Return values
Error|nullgetErrors()
Getting array of errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getErrorsByCode()
Getting array of errors with the necessary code.
public
getErrorsByCode(string $code) : array<string|int, Error>
Parameters
- $code : string
-
Code of error.
Return values
array<string|int, Error>getFilter()
Gets filter parameters.
public
getFilter([array<string|int, string> $defaultFilter = [] ][, Base $entity = null ]) : array<string|int, mixed>
Parameters
- $defaultFilter : array<string|int, string> = []
-
Default filter set.
- $entity : Base = null
-
Leave only fields for this entity.
Return values
array<string|int, mixed>getFilterId()
Gets stored filter id.
public
getFilterId() : int
Return values
intgetFilterValue()
Gets filter parameter by key.
public
getFilterValue(string $key[, string $acceptedListModificators = '=<>!@%' ]) : mixed|null
Parameters
- $key : string
-
Parameter name to filter.
- $acceptedListModificators : string = '=<>!@%'
-
List of accepted filter modificator. Defaults are '=<>!@%'.
Return values
mixed|nullgetFolderList()
Returns folder list corresponding to module.
public
getFolderList(Storage $storage) : array<string|int, Folder>|array<string|int, mixed>
Parameters
- $storage : Storage
-
Module's storage.
Return values
array<string|int, Folder>|array<string|int, mixed>getFragment()
Finds entity object by filter.
public
static getFragment(array<string|int, string> $filter) : Fragment
Parameters
- $filter : array<string|int, string>
-
Filter with module id.
Return values
FragmentgetGroupBy()
Gets group by fields.
public
getGroupBy() : array<string|int, mixed>
Return values
array<string|int, mixed>getIblockList()
Returns iblock list corresponding to module.
public
getIblockList() : array<string|int, mixed>
Return values
array<string|int, mixed>getIndicator()
Constructs and returns indicator type object.
public
final static getIndicator(string $indicatorTypeId) : IVolumeIndicator
Parameters
- $indicatorTypeId : string
-
Indicator class name.
Tags
Return values
IVolumeIndicatorgetIndicatorId()
public
final static getIndicatorId() : string
Return values
string —The short indicator name of this class.
getLimit()
Gets limit result rows count.
public
getLimit() : int
Return values
intgetMeasurementResult()
Returns calculation result set.
public
getMeasurementResult([array<string|int, mixed> $collectedData = [] ]) : Result
Parameters
- $collectedData : array<string|int, mixed> = []
-
List types of collected data to return.
Return values
ResultgetMeasureStages()
Returns measure process stages list.
public
getMeasureStages() : array<string|int, string>
List types data to collect: ATTACHED_OBJECT, SHARING_OBJECT, EXTERNAL_LINK, UNNECESSARY_VERSION or PREVIEW_FILE.
Return values
array<string|int, string>getModuleId()
Returns module identifier.
public
static getModuleId() : string
Tags
Return values
stringgetOffset()
Gets offset in result.
public
getOffset() : int
Return values
intgetOrder()
Gets sort order parameters.
public
getOrder([array<string|int, string> $defaultOrder = [] ]) : array<string|int, mixed>
Parameters
- $defaultOrder : array<string|int, string> = []
-
Default order set.
Return values
array<string|int, mixed>getOwner()
Gets owner id.
public
getOwner() : int|null
Return values
int|nullgetPreviewCount()
Returns total amount of preview files.
public
getPreviewCount() : float
Return values
floatgetPreviewSize()
Returns total volume size of preview files.
public
getPreviewSize() : float
Return values
floatgetSelect()
Gets select fields.
public
getSelect() : array<string|int, mixed>
Return values
array<string|int, mixed>getSpecialFolderCode()
Returns special folder code list.
public
static getSpecialFolderCode() : array<string|int, string>
Return values
array<string|int, string>getSpecialFolderXmlId()
Returns special folder xml_id code list.
public
static getSpecialFolderXmlId() : array<string|int, string>
Return values
array<string|int, string>getSpecific()
Returns entity specific corresponding to module.
public
static getSpecific(Fragment $fragment) : array<string|int, mixed>
Parameters
- $fragment : Fragment
-
Entity object.
Return values
array<string|int, mixed>getStage()
Gets current stage id.
public
getStage() : string|null
Return values
string|nullgetStorageList()
Returns module corresponding to module.
public
getStorageList() : array<string|int, Storage>|array<string|int, mixed>
Return values
array<string|int, Storage>|array<string|int, mixed>getTitle()
Returns title of the entity object.
public
static getTitle(Fragment $fragment) : string|null
Parameters
- $fragment : Fragment
-
Module description structure.
Return values
string|nullgetTotalAttached()
Returns total amount of attached objects selecting by filter.
public
getTotalAttached() : float
Return values
floatgetTotalCount()
Returns total amount of objects selecting by filter.
public
getTotalCount() : float
Return values
floatgetTotalLink()
Returns total amount of external links to objects selecting by filter.
public
getTotalLink() : float
Return values
floatgetTotalSharing()
Returns total number sharing of objects selecting by filter.
public
getTotalSharing() : float
Return values
floatgetTotalSize()
Returns total volume size of objects selecting by filter.
public
getTotalSize() : float
Return values
floatgetTotalVersion()
Returns total amount of objects selecting by filter.
public
getTotalVersion() : float
Return values
floatgetUnnecessaryVersionCount()
Returns total count of files without links and attached object.
public
getUnnecessaryVersionCount() : float
Return values
floatgetUnnecessaryVersionSize()
Returns total amount of files without links and attached object.
public
getUnnecessaryVersionSize() : int
Return values
intgetUpdateTime()
Returns last update time of the entity object.
public
static getUpdateTime(Fragment $fragment) : DateTime|null
Parameters
- $fragment : Fragment
-
Entity object.
Return values
DateTime|nullgetUserTypeFieldList()
Returns list of user fields corresponding to entity.
public
getUserTypeFieldList(string $entityClass[, array<string|int, string> $userTypeField = [CUserTypeFile::USER_TYPE_ID, DiskUfFileUserType::USER_TYPE_ID, DiskUfVersionUserType::USER_TYPE_ID] ]) : array<string|int, mixed>
Parameters
- $entityClass : string
-
Class name of entity.
- $userTypeField : array<string|int, string> = [CUserTypeFile::USER_TYPE_ID, DiskUfFileUserType::USER_TYPE_ID, DiskUfVersionUserType::USER_TYPE_ID]
-
User field's type codes.
Return values
array<string|int, mixed>hasErrors()
Tells true if error have happened.
public
hasErrors() : bool
Return values
boolisMeasureAvailable()
Returns true if module installed and available to measure.
public
isMeasureAvailable() : bool
Return values
boolisResultAvailable()
Tells true if total result is available.
public
isResultAvailable() : bool
Return values
boollistClearConstraint()
Returns clearance constraint list.
public
final static listClearConstraint() : array<string|int, string>
Return values
array<string|int, string>listClearFolderConstraint()
Returns clearance constraint list.
public
final static listClearFolderConstraint() : array<string|int, string>
Return values
array<string|int, string>listDeleteConstraint()
Returns delete constraint list.
public
final static listDeleteConstraint() : array<string|int, string>
Return values
array<string|int, string>listIndicator()
Returns indicator list available in library.
public
final static listIndicator() : array<string|int, mixed>
Return values
array<string|int, mixed>loadTotals()
Returns total amount of objects selecting by filter.
public
loadTotals() : array<string|int, float>
Return values
array<string|int, float>measure()
Runs measure test to get volumes of selecting objects.
public
measure([array<string|int, mixed> $collectData = [] ]) : static
Parameters
- $collectData : array<string|int, mixed> = []
-
List types data to collect: ATTACHED_OBJECT, SHARING_OBJECT, EXTERNAL_LINK, UNNECESSARY_VERSION.
Return values
staticprepareData()
Preforms data preparation.
public
prepareData() : static
Return values
staticpurify()
Deletes objects selecting by filter.
public
purify() : static
Return values
staticrecalculatePercent()
Recalculates percent from total file size per row selected by filter.
public
recalculatePercent([string|IVolumeIndicator $totalSizeIndicator = 'BitrixDiskVolumeBfile' ][, string|IVolumeIndicator $excludeSizeIndicator = null ]) : static
Parameters
- $totalSizeIndicator : string|IVolumeIndicator = 'BitrixDiskVolumeBfile'
-
Use this indicator as total volume.
- $excludeSizeIndicator : string|IVolumeIndicator = null
-
Exclude indicator's volume from total volume.
Tags
Return values
staticresetMeasurementResult()
Unset calculated values.
public
resetMeasurementResult() : static
Return values
staticrestoreFilter()
Restores filter state from saved $measurement result.
public
restoreFilter(int|array<string|int, mixed> $measurementResult) : static
Parameters
- $measurementResult : int|array<string|int, mixed>
-
The id of result row or row from table.
Return values
staticsetFilterId()
Sets filter id.
public
setFilterId(int $filterId) : static
Parameters
- $filterId : int
-
Stored filter id.
Return values
staticsetLimit()
Sets limit result rows count.
public
setLimit(int $limit) : static
Parameters
- $limit : int
-
Limit value.
Return values
staticsetOffset()
Sets offset in result.
public
setOffset(int $offset) : static
Parameters
- $offset : int
-
Offset value.
Return values
staticsetOrder()
Sets sort order parameters.
public
setOrder(array<string|int, string> $order) : static
Parameters
- $order : array<string|int, string>
-
Sort order parameters and directions.
Return values
staticsetOwner()
Sets owner id.
public
setOwner(int $ownerId) : static
Parameters
- $ownerId : int
-
User id.
Return values
staticsetStage()
Sets current stage id.
public
setStage(string|null $stageId) : static
Parameters
- $stageId : string|null
-
Stage id.
Return values
staticunsetFilter()
Clear filter parameters.
public
unsetFilter([string $key = '' ]) : static
Parameters
- $key : string = ''
-
Parameter name to unset.