Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс Options

Открытые члены

 __construct ($filterId, $filterPresets=array(), $commonPresetsId=null)
 
 getCommonPresetsId ()
 
 isUseCommonPresets ()
 
 getId ()
 
 setPresets ($presets=array())
 
 setCurrentPreset ($presetId="default_filter")
 
 getDefaultPresets ()
 
 getPresets ()
 
 setDefaultPreset ($presetId="default_filter")
 
 isUsePinPreset ()
 
 setDefaultPresets ($presets=array())
 
 setDeletedPresets ($deletedPresets=array())
 
 setUsePinPreset ($value=true)
 
 fetchOptions ($id)
 
 getOptions ()
 
 pinPreset ($presetId="default_filter")
 
 getSessionFilterId ()
 
 isSetOutside ()
 
 getAdditionalPresetFields ($presetId)
 
 setAdditionalPresetFields ($presetId, $additional=array())
 
 getDefaultFilterId ()
 
 getCurrentFilterId ()
 
 getFilterSettings ($presetId)
 
 getFilter ($sourceFields=array())
 
 getFilterLogic ($sourceFields=array())
 
 getSearchString ()
 
 save ()
 
 getAllUserOptions ()
 
 saveForAll ()
 
 saveOptionsForUser ($options, $userId)
 
 saveCommon ()
 
 setFilterRows ($presetId, $rows)
 
 removeRowFromPreset (string $presetId, string $rowName)
 
 restore ($settings=array())
 
 setFilterSettingsArray ($settings=array())
 
 setFilterSettings ($presetId, $settings, $currentPreset=true, $useRequest=true)
 
 deleteFilter ($presetId, $isDefault=false)
 
 isDeletedPreset ($presetId)
 
 setupDefaultFilter (array $fields, array $rows)
 
 reset ()
 
 destroy ()
 
 getUsedFields ()
 
 getCurrentFilterPresetId ()
 
 setCurrentFilterPresetId (?string $presetId)
 

Открытые статические члены

static fetchCommonPresets ($id)
 
static findDefaultPresetId ($presets=array())
 
static isSetFromRequest (HttpRequest $request)
 
static fetchSettingsFromQuery ($fields, HttpRequest $request)
 
static isDateField ($key="")
 
static fetchDateFieldValue ($key="", $filterFields=array())
 
static fetchNumberFieldValue ($key="", $filterFields=array())
 
static isNumberField ($key="")
 
static fetchFieldValuesFromFilterSettings ($filterSettings=array(), $additionalFields=array(), $sourceFields=array())
 
static isDefaultFilter ($presetId="")
 
static isCurrentUserEditOtherSettings ()
 
static isCommon ($options)
 
static calcDates ($fieldId, $source, &$result)
 
static destroyById ($filterId)
 
static getRowsFromFields ($fields=array())
 
static fetchPresetFields ($preset)
 

Открытые атрибуты

const DEFAULT_FILTER = "default_filter"
 
const TMP_FILTER = "tmp_filter"
 

Защищенные члены

 getRequest ()
 
 trySetFilterFromRequest ($fields=array())
 

Защищенные статические члены

static getUserId ()
 
static fetchFieldsFromFilterSettings ($filterSettings=array(), $additionalFields=array())
 

Защищенные данные

 $id
 
 $options
 
 $commonPresets
 
 $useCommonPresets
 
 $commonPresetsId
 
 $request
 
string $currentFilterPresetId = null
 

Подробное описание

См. определение в файле options.php строка 17

Конструктор(ы)

◆ __construct()

__construct ( $filterId,
$filterPresets = array(),
$commonPresetsId = null )

Options constructor.

Аргументы
string$filterId$arParams["FILTER_ID"]
array$filterPresets$arParams["FILTER_PRESETS"]
string$commonPresetsId$arParams["COMMON_PRESETS_ID"] Set if you want to use common presets

См. определение в файле options.php строка 37

Методы

◆ calcDates()

static calcDates ( $fieldId,
$source,
& $result )
static

Calculate date value

Аргументы
string$fieldId
array$sourceSource values
array$resultResult values
Исключения

Bitrix\Main\ObjectException

См. определение в файле options.php строка 1265

◆ deleteFilter()

deleteFilter ( $presetId,
$isDefault = false )

Deletes preset by preset id

Аргументы
string$presetId
bool$isDefault

См. определение в файле options.php строка 1225

◆ destroy()

destroy ( )

Destroys this filter options

См. определение в файле options.php строка 1682

◆ destroyById()

static destroyById ( $filterId)
static

Destroys filter options by filter id

Аргументы
$filterId

См. определение в файле options.php строка 1692

◆ fetchCommonPresets()

static fetchCommonPresets ( $id)
static

Gets common presets from database

Аргументы
string$idCommon presets id $arParams["COMMON_PRESETS_ID"]
Возвращает
array|bool

См. определение в файле options.php строка 250

◆ fetchDateFieldValue()

static fetchDateFieldValue ( $key = "",
$filterFields = array() )
static

Fetches date field values

Аргументы
string$key
array$filterFields
Возвращает
array
Исключения

Bitrix\Main\ObjectException

См. определение в файле options.php строка 643

◆ fetchFieldsFromFilterSettings()

static fetchFieldsFromFilterSettings ( $filterSettings = array(),
$additionalFields = array() )
staticprotected

Fetches filter fields from filter settings

Аргументы
array$filterSettings
array$additionalFields
Возвращает
array

См. определение в файле options.php строка 605

◆ fetchFieldValuesFromFilterSettings()

static fetchFieldValuesFromFilterSettings ( $filterSettings = array(),
$additionalFields = array(),
$sourceFields = array() )
static

См. определение в файле options.php строка 703

◆ fetchNumberFieldValue()

static fetchNumberFieldValue ( $key = "",
$filterFields = array() )
static

Fetches number field values

Аргументы
string$key
array$filterFields
Возвращает
array

См. определение в файле options.php строка 670

◆ fetchOptions()

fetchOptions ( $id)

Gets filter options from database

Аргументы
string$idFilter id $arParams["FILTER_ID"]
Возвращает
array|bool

См. определение в файле options.php строка 274

◆ fetchPresetFields()

static fetchPresetFields ( $preset)
static

Fetches preset fields list

Аргументы
array$preset
Возвращает
array

См. определение в файле options.php строка 1741

◆ fetchSettingsFromQuery()

static fetchSettingsFromQuery ( $fields,
HttpRequest $request )
static

Fetches field values from request

Аргументы
array$fields
HttpRequest$request
Возвращает
array|null

См. определение в файле options.php строка 392

◆ findDefaultPresetId()

static findDefaultPresetId ( $presets = array())
static

Finds default preset in presets array

Аргументы
array$presets
Возвращает
string Default preset id

См. определение в файле options.php строка 322

◆ getAdditionalPresetFields()

getAdditionalPresetFields ( $presetId)

Gets additional preset fields

Аргументы
string$presetId
Возвращает
array

См. определение в файле options.php строка 526

◆ getAllUserOptions()

getAllUserOptions ( )

@noinspection PhpUndefinedClassInspection Gets filter options for all users

Возвращает
bool|\CDBResult

См. определение в файле options.php строка 867

◆ getCommonPresetsId()

getCommonPresetsId ( )
Возвращает
string

См. определение в файле options.php строка 130

◆ getCurrentFilterId()

getCurrentFilterId ( )

Gets current applied filter id

Возвращает
mixed

См. определение в файле options.php строка 560

◆ getCurrentFilterPresetId()

getCurrentFilterPresetId ( )
Возвращает
string|null

См. определение в файле options.php строка 1794

◆ getDefaultFilterId()

getDefaultFilterId ( )

Gets default filter

Возвращает
mixed

См. определение в файле options.php строка 550

◆ getDefaultPresets()

getDefaultPresets ( )

Gets default presets from filter options

Возвращает
array|null

См. определение в файле options.php строка 179

◆ getFilter()

getFilter ( $sourceFields = array())

Gets current filter values

Аргументы
array$sourceFieldsFilter fields $arParams["FILTER"]
Возвращает
array

См. определение в файле options.php строка 770

◆ getFilterLogic()

getFilterLogic ( $sourceFields = array())

Gets current filter values that available for DB seach

Аргументы
array$sourceFieldsFilter fields $arParams["FILTER"]
Возвращает
array

См. определение в файле options.php строка 801

◆ getFilterSettings()

getFilterSettings ( $presetId)

Gets filter settings by preset id

Аргументы
$presetId
Возвращает
array|null

См. определение в файле options.php строка 593

◆ getId()

getId ( )

Gets filter id

Возвращает
string

См. определение в файле options.php строка 149

◆ getOptions()

getOptions ( )

Gets filter options

Возвращает
array

См. определение в файле options.php строка 345

◆ getPresets()

getPresets ( )

Gets presets

Возвращает
array|null

См. определение в файле options.php строка 189

◆ getRequest()

getRequest ( )
protected

См. определение в файле options.php строка 311

◆ getRowsFromFields()

static getRowsFromFields ( $fields = array())
static

См. определение в файле options.php строка 1701

◆ getSearchString()

getSearchString ( )

Gets filter search string

Возвращает
string

См. определение в файле options.php строка 816

◆ getSessionFilterId()

getSessionFilterId ( )

Gets session filter

Возвращает
mixed

См. определение в файле options.php строка 503

◆ getUsedFields()

getUsedFields ( )

Gets used fields

Возвращает
array

См. определение в файле options.php строка 1757

◆ getUserId()

static getUserId ( )
staticprotected

См. определение в файле options.php строка 297

◆ isCommon()

static isCommon ( $options)
static

Checks whether the parameters is common

Аргументы
$options
Возвращает
bool

См. определение в файле options.php строка 941

◆ isCurrentUserEditOtherSettings()

static isCurrentUserEditOtherSettings ( )
static
Возвращает
bool

См. определение в файле options.php строка 876

◆ isDateField()

static isDateField ( $key = "")
static
Аргументы
string$key
Возвращает
bool

См. определение в файле options.php строка 630

◆ isDefaultFilter()

static isDefaultFilter ( $presetId = "")
static
Аргументы
string$presetId
Возвращает
bool

См. определение в файле options.php строка 760

◆ isDeletedPreset()

isDeletedPreset ( $presetId)

Checks preset is deleted

Аргументы
string$presetId
Возвращает
bool

См. определение в файле options.php строка 1241

◆ isNumberField()

static isNumberField ( $key = "")
static

См. определение в файле options.php строка 697

◆ isSetFromRequest()

static isSetFromRequest ( HttpRequest $request)
static

Checks is need whether to set fields from query

Аргументы
HttpRequest$request
Возвращает
bool

См. определение в файле options.php строка 376

◆ isSetOutside()

isSetOutside ( )

См. определение в файле options.php строка 510

◆ isUseCommonPresets()

isUseCommonPresets ( )
Возвращает
bool

См. определение в файле options.php строка 139

◆ isUsePinPreset()

isUsePinPreset ( )

Checks is need use pinned preset

Возвращает
bool

См. определение в файле options.php строка 209

◆ pinPreset()

pinPreset ( $presetId = "default_filter")

Makes preset as default

Аргументы
string$presetIdPreset id

См. определение в файле options.php строка 355

◆ removeRowFromPreset()

removeRowFromPreset ( string $presetId,
string $rowName )

См. определение в файле options.php строка 1022

◆ reset()

reset ( )

Resets current applied filter

См. определение в файле options.php строка 1673

◆ restore()

restore ( $settings = array())

Restores filter options to default

Аргументы
array$settings

См. определение в файле options.php строка 1046

◆ save()

save ( )

Saves filter optionsGet

См. определение в файле options.php строка 828

◆ saveCommon()

saveCommon ( )

Saves current options as common

См. определение в файле options.php строка 985

◆ saveForAll()

saveForAll ( )

Saves filter options for all users

См. определение в файле options.php строка 886

◆ saveOptionsForUser()

saveOptionsForUser ( $options,
$userId )

Saves options for user with $userId

Аргументы
array$options
$userId

См. определение в файле options.php строка 952

◆ setAdditionalPresetFields()

setAdditionalPresetFields ( $presetId,
$additional = array() )

Sets additional fields

Аргументы
string$presetId
array$additional

См. определение в файле options.php строка 540

◆ setCurrentFilterPresetId()

setCurrentFilterPresetId ( ?string $presetId)
Аргументы
string | null$presetId
Возвращает
Options

См. определение в файле options.php строка 1803

◆ setCurrentPreset()

setCurrentPreset ( $presetId = "default_filter")

Sets current preset id

Аргументы
string$presetId

См. определение в файле options.php строка 169

◆ setDefaultPreset()

setDefaultPreset ( $presetId = "default_filter")

Sets default preset id

Аргументы
string$presetId

См. определение в файле options.php строка 199

◆ setDefaultPresets()

setDefaultPresets ( $presets = array())

Sets default presets

Аргументы
array$presets

См. определение в файле options.php строка 219

◆ setDeletedPresets()

setDeletedPresets ( $deletedPresets = array())

Sets deleted presets array

Аргументы
array$deletedPresets

См. определение в файле options.php строка 229

◆ setFilterRows()

setFilterRows ( $presetId,
$rows )

Sets filter preset rows

Аргументы
string$presetId
$rows

См. определение в файле options.php строка 1009

◆ setFilterSettings()

setFilterSettings ( $presetId,
$settings,
$currentPreset = true,
$useRequest = true )
Аргументы
string$presetId
$settings
bool$currentPreset
bool$useRequest

См. определение в файле options.php строка 1106

◆ setFilterSettingsArray()

setFilterSettingsArray ( $settings = array())
Аргументы
array$settings

См. определение в файле options.php строка 1071

◆ setPresets()

setPresets ( $presets = array())

Sets filter presets

Аргументы
array$presets

См. определение в файле options.php строка 159

◆ setupDefaultFilter()

setupDefaultFilter ( array $fields,
array $rows )

Setup Default Filter Settings

Аргументы
array$fieldsDefault Filter Fields.
array$rowsDefault Filter Rows.

См. определение в файле options.php строка 1251

◆ setUsePinPreset()

setUsePinPreset ( $value = true)

Sets use_pin_preset values

Аргументы
boolean$value

См. определение в файле options.php строка 239

◆ trySetFilterFromRequest()

trySetFilterFromRequest ( $fields = array())
protected

См. определение в файле options.php строка 568

Данные класса

◆ $commonPresets

$commonPresets
protected

См. определение в файле options.php строка 21

◆ $commonPresetsId

$commonPresetsId
protected

См. определение в файле options.php строка 23

◆ $currentFilterPresetId

string $currentFilterPresetId = null
protected

См. определение в файле options.php строка 25

◆ $id

$id
protected

См. определение в файле options.php строка 19

◆ $options

$options
protected

См. определение в файле options.php строка 20

◆ $request

$request
protected

См. определение в файле options.php строка 24

◆ $useCommonPresets

$useCommonPresets
protected

См. определение в файле options.php строка 22

◆ DEFAULT_FILTER

const DEFAULT_FILTER = "default_filter"

См. определение в файле options.php строка 27

◆ TMP_FILTER

const TMP_FILTER = "tmp_filter"

См. определение в файле options.php строка 28