Documentation

UserField

Class provides interface for handling user field settings.

class Bitrix\Rpa\UserField\UserField implements \ArrayAccess

Methods

Method Description Available from version
public function __construct(array $data, array $visibility) Constructor.
  • $data - array with description of user field. This array can be retrieved via \CUserTypeManager::GetUserFields()
[
    'ID' => 1, // field id
    'FIELD_NAME' => 'UF_RPA_1_FIELDNAME', // field code
    'EDIT_FORM_LABEL' => 'Name', // field name
    'USER_TYPE_ID' => 'string', // field type ID
    'SETTINGS' => [], // array of additional settings
    'MANDATORY' => 'N', // flag to set field as required
    'MULTIPLE' => 'N', // flag for boolean field
    'USER_TYPE' => [], // array of type description
];
  • $visibility - array of this field visibility settings here the key is visibility type, value - true/false
public function getName(): string Returns field code.
public function getTitle(): string Returns field name.
public function toArray(): array Returns array with full field description.
public function getUserTypeId(): string Returns type's string ID.
public function getSettings(): ?array Returns array with field description.
public function isVisible(): bool Returns true, when field is available from viewing.
public function isEditable(): bool Returns true, when field is available for modifying.
public function isMandatory(): bool Returns true, when field is a required field according to [link=fieldtable]field settings[/link].
public function isMandatoryByDefault(): bool Returns true, when field is a required field according to general field settings.
public function isMultiple(): bool Returns true, when field is a boolean type.
public function isKanbanVisible(): bool Returns true, when field must be displayed in kanban details card.
public function isAvailableOnCreate(): bool Returns true when field must be available in quick creation form.
public function isBaseTypeFile(): bool Returns true when field is a file.
public function isBaseTypeDate(): bool Returns true when field is a date.


© «Bitrix24», 2001-2024
Up