method public static

File::convertValueSingle()

Класс: \Bitrix\Bizproc\BaseType\File

Сигнатура

public static convertValueSingle(FieldType $fieldType, mixed $value, string $toTypeClass) : bool|int|float|string

Параметры

$fieldType FieldType
Тип поля документа.
$value mixed
Значение поля.
$toTypeClass string
Имя класса типа.

Возвращаемое значение

bool|int|float|string

Как применяется в File

File::convertValueSingle() — метод класса \Bitrix\Bizproc\BaseType\File модуля «Бизнес-процессы».

Статический метод — вызывается через имя класса File, без создания объекта.

use Bitrix\Main\Loader;
use Bitrix\Bizproc\BaseType\File;

Loader::includeModule('bizproc');

$fieldType = null; // FieldType
$value = null;
$toTypeClass = '';
$result = File::convertValueSingle($fieldType, $value, $toTypeClass);
// $result: bool|int|float|string

Другие методы File

convertValueSingle() есть и у других классов модуля «Бизнес-процессы»: Base, BoolType, Date, Datetime, Double, InternalSelect, IntType, Select.

Исходный файл: source/bizproc/lib/basetype/file.php:189

Что будем искать? Например,Продвижение