Kernel::WebApp::Util::BusinessObject::Role::ProvidesDynamicFields

NAME

Kernel::WebApp::Util::BusinessObject::Role::ProvidesDynamicFields – Provides the dynamic field support for a business object.

has ItemDetailDataDynamicFields

Attribute that holds the dynamic fields which should be included in the item detail data.

has LookupItemDetailDataDynamicFieldsObject

Lookup attribute that holds the dynamic fields object which should be included in the item detail data.

requires DynamicFieldObjectTypes

Every business object type that consumes the dynamic field role, must implement a method DynamicFieldObjectTypes, this method provides the dynamic field types for the current business object type.

around MethodParamValidationSchema()

Around's the original 'MethodParamValidationSchema' of the driver to just add the schema of the parameter 'ObjectAttributes'.

around ItemDetailDataGet()

Around's the original 'ItemDetailDataGet' to add dynamic field values tot he item data.

around ItemDetailDataGetForExport()

Around's the original 'ItemDetailDataGetForExport' to add dynamic field values tot he item data.

TransformActiveDynamicFieldFilterValue()

Transform the active dynamic field filter value with the given value type to a usable search backend value.

my $TransformedActiveFilter = $BusinessObjectTypeObject->TransformActiveDynamicFieldFilterValue( ValueType => 'String', FilterName => 'Seen', FilterValues => { Value => [0, 1], }, );

Returns the transformed active filters.

    (
        DynamicField_Name => {
            Equals => 'Test',
        }
    )

override ColumnTitlesForExport()

Get the column titles for the export also for dynamic fields.

override FiltersGet()

Get the filters from the provide filters function and return the available filters from the config.

ColumnTitlesForDynamicFields()

This method returns the dynamic field objects as an array reference.

    my %ColumnTitleDynamicFields = $BusinessObjectTypeObject->ColumnTitlesForDynamicFields(
        Columns => {
            DynamicField_Test => 1,
            ...
        },
    );

Returns

    (
        DynamicField_Test => 'Test',
    )

DynamicFieldObjectsGet()

This method returns the dynamic field objects as an array reference.

    my $DynamicFieldsConfig = $BusinessObjectTypeObject->DynamicFieldObjectsGet(
        Valid        => 1,
        ObjectType   => [ 'Ticket', 'Article' ],
        FieldDisplay => $Self->_TicketDetailViewConfig()->{FollowUpDynamicField} || {}, # optional
    );

DynamicFieldSchemaApplyACLs()

This method applies the ACLs to the given dynamic field.

    $Self->DynamicFieldSchemaApplyACLs(
        Field       => $DynamicField,
        Schema      => {...},
        PossibleValuesParams => {
            RequestData => {...},
            ObjectID    => 123,
            Context     => 'agent',
        },
        ACLParams   => {
            TicketData      => {...},
            TicketID        => 123,
            EndpointContext => 'abc',
            UserIDKey       => 'UserID',
            UserIDValue     => 123,
        },
    );

PRIVATE INTERFACE

_BuildLookupItemDetailDataDynamicFieldsObject()

Initializes the attribute LookupItemDetailDataDynamicFieldsObject.

_ProvideFilterDynamicFieldsObject()

Provided the dynamic fields which can be used as a filter.

_ProvideFilterDynamicFieldsObjectACLs()

_SetItemDetailDataDynamicFields()

This function will be called every time the attribute ItemDetailDataDynamicFields gets a new value. It will clear the current dynamic fields lookup to force a rebuild with the new value.

Scroll to Top