OTRS 7.0 API Reference Perl

Description manuals and libraries
OTRS 7.0 API Reference Perl > Perl Modules > Kernel::WebApp::Controller::API::Role::ProvidesForm

NAME

Kernel::WebApp::Controller::API::Role::ProvidesForm - Role for form endpoints to return the schema and validate the data.

DESCRIPTION

This role re-implements the 'Handler' and two phases, 'DataValidate' and 'Action'.

The 'Handler' identify if the form is to be validated or not. The 'DataValidate' performs the form validation. The 'Action' just returns the form schema.

PUBLIC INTERFACE

FormSchema

Return the form schema that the form object will use to build itself.

Returns

    - an hashref with the following format:
    {
        Fields => [

        ],
    }

has DoValidateFormData

Attribute that holds the state if the form should be validated or not.

Form()

Accessor for the form object. It checks if the object was already created, if not, it will create it.

PRIVATE INTERFACE

has _Form

Attribute that holds a reference for the form object.

_BuildFormSignature()

Initializes the attribute FormSignature.