Kernel::System::TypeService

NAME

Kernel::System::TypeService – type-services relations lib

DESCRIPTION

All functions for type-service relations.

PUBLIC INTERFACE

new()

create an object. Do not use it directly, instead use:

    use Kernel::System::ObjectManager;
    local $Kernel::OM = Kernel::System::ObjectManager->new();
    my $TypeServiceObject = $Kernel::OM->Get('Kernel::System::TypeService');

TypeServiceGet()

get related type ids with services id or vice versa

    my %Data = $TypeServiceObject->TypeServiceGet(
        TypeID  => 123,
    );

    my %Data = $TypeServiceObject->TypeServiceGet(
        ServiceID  => 123,
    );

Returns: %Data = ( Types => [ 23, 35, … ], Services => [ 22, 32, … ], );

DeleteTypeService()

deletes all relations between the state id given and its responses and vice versa

    my $Success = $TypeServiceObject->DeleteTypeService(
        TypeID  => 123,
    );

    my $Success = $TypeServiceObject->DeleteTypeService(
        ServiceID  => 123,
    );

    returns 1 if the deletion was successful or 0, otherwise

AddTypeService()

creates relations between the states and responses

    my $Success = $TypeServiceObject->AddTypeService(
        ID          => 123,              # id of the $Type element
        ElementList => \@Elements,       # list of IDs to associate with the id of the $Type element
        Type        => 'Type',           # it can be 'Type' or 'Service'
        UserID      => 1,
    );
Scroll to Top