Bitrix API

Manager

Table of Contents

Methods

asMultiple()  : array<string|int, mixed>
Get multiple value.
getCommonSettings()  : array<string|int, mixed>
Get settings, common to all input types.
getEditHtml()  : string
Return html input control for value.
getError()  : array<string|int, mixed>
Get user input validation errors.
getFilterEditHtml()  : mixed
getRequiredError()  : mixed
getSettings()  : array<string|int, mixed>
Get settings inputs for user control.
getTypes()  : array<string|int, mixed>
Get all registered types.
getValue()  : mixed
Get normalized user input value (for example to save to database).
getViewHtml()  : string
Return html representation of value.
initJs()  : mixed
register()  : void
Register new type.

Methods

asMultiple()

Get multiple value.

public static asMultiple(array<string|int, mixed> $input, mixed $value) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>
$value : mixed
Tags
throws
SystemException
Return values
array<string|int, mixed>
  • if value is single, wrap it in array (except null, which gets empty array)

getCommonSettings()

Get settings, common to all input types.

public static getCommonSettings(array<string|int, mixed> $input[, string|null $reload = null ]) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>
  • input settings values
$reload : string|null = null
  • javascript form reload action
Return values
array<string|int, mixed>
  • ([setting name] => input array)

getEditHtml()

Return html input control for value.

public static getEditHtml(string $name, array<string|int, mixed> $input[, mixed $value = null ]) : string
Parameters
$name : string
  • name for input control (eg: 'email', 'person[1][name]')
$input : array<string|int, mixed>
  • input settings values
$value : mixed = null
  • value to render
Tags
throws
SystemException
Return values
string
  • html

getError()

Get user input validation errors.

public static getError(array<string|int, mixed> $input, string|array<string|int, mixed>|null $value) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>
  • input settings values
$value : string|array<string|int, mixed>|null
  • value to validate
Tags
throws
SystemException
Return values
array<string|int, mixed>
  • empty array on success OR array ([error code] => error message) on failure

getFilterEditHtml()

public static getFilterEditHtml(mixed $name, array<string|int, mixed> $input[, null $value = null ]) : mixed
Parameters
$name : mixed
$input : array<string|int, mixed>
$value : null = null
Tags
throws
SystemException

getRequiredError()

public static getRequiredError(array<string|int, mixed> $input, mixed $value) : mixed
Parameters
$input : array<string|int, mixed>
$value : mixed
Tags
throws
SystemException

getSettings()

Get settings inputs for user control.

public static getSettings(array<string|int, mixed> $input[, string|null $reload = null ]) : array<string|int, mixed>
Parameters
$input : array<string|int, mixed>
  • input settings values
$reload : string|null = null
  • javascript form reload action
Tags
throws
SystemException
Return values
array<string|int, mixed>
  • ([setting name] => input array)

getTypes()

Get all registered types.

public static getTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>
  • ([TYPE NAME] => array('CLASS', 'NAME', ...))

getValue()

Get normalized user input value (for example to save to database).

public static getValue(array<string|int, mixed> $input, string|array<string|int, mixed>|null $value) : mixed

Before saving to database check value for errors with Manager::getError!

Parameters
$input : array<string|int, mixed>
  • input settings values
$value : string|array<string|int, mixed>|null
  • value to normalize
Tags
throws
SystemException
Return values
mixed

result

getViewHtml()

Return html representation of value.

public static getViewHtml(array<string|int, mixed> $input[, mixed $value = null ]) : string
Parameters
$input : array<string|int, mixed>
  • input settings values
$value : mixed = null
  • value to render
Tags
throws
SystemException
Return values
string
  • html

initJs()

public static initJs() : mixed

register()

Register new type.

public static register(string $name, array<string|int, mixed> $type) : void
Parameters
$name : string
  • type name
$type : array<string|int, mixed>
  • type parameters 'CLASS' => NAMESPACE.'ClassName' 'NAME' => Loc::getMessage('CLASS_LOCALIZED_NAME')
Tags
throws
SystemException

        
On this page

Search results