AdminTranslation#
NAME#
Kernel::Modules::AdminTranslation - Translation Admin Interface
SYNOPSIS#
Create and maintain Translation Entries
PUBLIC INTERFACE#
Run()#
Preform requests by Admin Users to create or update DatababaseBackend records
_Overview()#
Rendering the _OverviewActionList and _OverviewRender
my $Success = $Self->_Overview();
_OverviewActionList()#
Displays the possible actions in the Overview view.
my $Success = $Self->_OverviewActionList();
_OverviewRender()#
Renders the blocks for existing Database records in the Overview list view
my $Success = $Self->_OverviewRender();
_Form()#
Fetches data of the currently requested record if Parameter ID is given, else displays the Add page.
Calls _FormActionList and _FormRender for record rendering or displaying the Add form.
my $Success = $Self->_Form(
ID => 1234, # optional, ID of the currently edited record, empty on Add
);
_FormActionList()#
Displays the possible actions on the left side of Record adding/Record updating form.
my $Success = $Self->_FormActionList();
_FormRender()#
Renders the Add or Update form for the record.
- The following fields are always displayed:
Name (has to be unique) Valid
my $Success = $Self->_FormRender(
BackendData => {} # required, containing the record on Update, empty hashref on Add.
);
_GenericForm()#
Renders the html page and form for add or update views
my $Output = $Self->_GenericForm();
_GenericAction()#
Handles the add or update request to store or change records
Returns the output of _Overview in case of success.
Displays the add or update form in case of error.
my $Output = $Self->_GenericAction();
_Copy()#
copy object
my $Output = $Self->_Copy();
_Delete()#
delete object
my $Output = $Self->_Delete();
_Import()#
handled import
my $Attachment = $Self->_Import();
_Export()#
handled export
my $Attachment = $Self->_Export();
_Deployment()#
handled deployment
my $Success = $Self->_Deployment();
_Validate()#
Validates the submit of an Add or Update request
Calls _ValidateMandatory and _ValidateName
my $Success = $Self->_Validate(
ValidationResult => {}, # Hashref that gets filled with the " ServerError" CSS class
# that is used to mark erroneous values in the template toolkit file
Errors => {}, # Hashref that gets filled with error messages if _Validate fails on some entries
GetParam => { # Hashref holding the submitted values
Name => ...,
...
},
);
_ValidateName()#
Checks if the given Name is available, fills the Errors Hashref if it is n’t available any more.
my $Success = $Self->_ValidateName(
Errors => {}, # Hashref that gets filled with error messages if _Validate fails on some entries
GetParam => { # Hashref holding the submitted values
Name => ...,
...
},
);
_ValidateMandatory()#
Checks if mandatory parameters (defined in ``$Self->{MandatoryParams}->{Fieldname}`` ) are present and have at least length.
my $Success = $Self->_ValidateMandatory(
Errors => {}, # Hashref that gets filled with error messages if _Validate fails on some entries
GetParam => { # Hashref holding the submitted values
Name => ...,
...
},
);
_ActionListRender()#
generates action list.
my $Success = $Self->_ActionListRender(
ActionItems => [
{
LinkHref => $LayoutObject->{Baselink} . 'Action=' . $LayoutObject->{Action} . ';Subaction=Add',
LinkClass => 'CallForAction Fullsize Center',
LinkText => "Add Translation",
IconClass => 'fa fa-plus-square',
},
{
LinkHref => $LayoutObject->{Baselink}
. 'Action='
. $LayoutObject->{Action}
. ';Subaction=Deployment;ID=1',
LinkClass => 'CallForAction Fullsize Center',
LinkText => "Deployment",
IconClass => 'fa fa-rocket',
}
],
);
Returns:
my $Success = 1;
_GetAttributes()#
Get all common attributes.
my $Success = $Self->_GetAttributes();
Returns:
my $Success = 1;
_GetFileFormat()#
returns the file format
my $Format = $Self->_GetFileFormat(%UploadFile);