Drupal 8  8.0.2
TranslationStatusForm Class Reference
Inheritance diagram for TranslationStatusForm:

Public Member Functions

 __construct (ModuleHandlerInterface $module_handler, StateInterface $state)
 
 getFormId ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 validateForm (array &$form, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 

Static Public Member Functions

static create (ContainerInterface $container)
 

Protected Member Functions

 prepareUpdateData (array $status)
 
 createInfoString ($project_info)
 

Protected Attributes

 $moduleHandler
 
 $state
 

Detailed Description

Provides a translation status form.

Constructor & Destructor Documentation

__construct ( ModuleHandlerInterface  $module_handler,
StateInterface  $state 
)

Constructs a TranslationStatusForm object.

Parameters
ModuleHandlerInterface$module_handlerA module handler.
\Drupal\Core\State\StateInterface$stateThe state service.

References Drupal\moduleHandler(), and Drupal\state().

Here is the call graph for this function:

Member Function Documentation

buildForm ( array  $form,
FormStateInterface  $form_state 
)

Form builder for displaying the current translation status.

References TranslationStatusForm\prepareUpdateData(), Drupal\state(), t(), and Drupal\url().

Here is the call graph for this function:

static create ( ContainerInterface  $container)
static

{}

createInfoString (   $project_info)
protected

Provides debug info for projects in case translation files are not found.

Translations files are being fetched either from Drupal translation server and local files or only from the local filesystem depending on the "Translation source" setting at admin/config/regional/translate/settings. This method will produce debug information including the respective path(s) based on this setting.

Parameters
array$project_infoAn array which is the project information of the source.
Returns
string The string which contains debug information.

References t().

Referenced by TranslationStatusForm\prepareUpdateData().

Here is the call graph for this function:

Here is the caller graph for this function:

getFormId ( )

{}

prepareUpdateData ( array  $status)
protected

Prepare information about projects with available translation updates.

Parameters
array$statusTranslation update status as an array keyed by Project ID and langcode.
Returns
array Translation update status as an array keyed by language code and translation update status.

References TranslationStatusForm\createInfoString(), and Drupal\moduleHandler().

Referenced by TranslationStatusForm\buildForm().

Here is the call graph for this function:

Here is the caller graph for this function:

submitForm ( array &  $form,
FormStateInterface  $form_state 
)

{}

References batch_set(), FormStateInterface\getValue(), Drupal\moduleHandler(), and Drupal\state().

Here is the call graph for this function:

validateForm ( array &  $form,
FormStateInterface  $form_state 
)

{}

References FormStateInterface\getValue(), FormStateInterface\setErrorByName(), and t().

Here is the call graph for this function:


The documentation for this class was generated from the following file: