
################
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


.. code-block:: perl

     my $Success = $Self->_Overview();



_OverviewActionList()
=====================


Displays the possible actions in the Overview view.


.. code-block:: perl

     my $Success = $Self->_OverviewActionList();



_OverviewRender()
=================


Renders the blocks for existing Database records in the Overview list view


.. code-block:: perl

     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.


.. code-block:: perl

     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.


.. code-block:: perl

     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


.. code-block:: perl

     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


.. code-block:: perl

     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.


.. code-block:: perl

     my $Output = $Self->_GenericAction();



_Copy()
=======


copy object


.. code-block:: perl

     my $Output = $Self->_Copy();



_Delete()
=========


delete object


.. code-block:: perl

     my $Output = $Self->_Delete();



_Import()
=========


handled import


.. code-block:: perl

     my $Attachment = $Self->_Import();



_Export()
=========


handled export


.. code-block:: perl

     my $Attachment = $Self->_Export();



_Deployment()
=============


handled deployment


.. code-block:: perl

     my $Success = $Self->_Deployment();



_Validate()
===========


Validates the submit of an Add or Update request

Calls _ValidateMandatory and _ValidateName


.. code-block:: perl

     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.


.. code-block:: perl

     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.


.. code-block:: perl

     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.


.. code-block:: perl

     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:


.. code-block:: perl

     my $Success = 1;



_GetAttributes()
================


Get all common attributes.


.. code-block:: perl

     my $Success = $Self->_GetAttributes();


Returns:


.. code-block:: perl

     my $Success = 1;



_GetFileFormat()
================


returns the file format


.. code-block:: perl

     my $Format = $Self->_GetFileFormat(%UploadFile);




