Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 12 |
ConfigTranslationEditForm | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 12 |
getFormId | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 2 |
|||
buildForm | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 7 |
|||
submitForm | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\config_translation\Form\ConfigTranslationEditForm. | |
*/ | |
namespace Drupal\config_translation\Form; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Routing\RouteMatchInterface; | |
/** | |
* Defines a form for editing configuration translations. | |
*/ | |
class ConfigTranslationEditForm extends ConfigTranslationFormBase { | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getFormId() { | |
return 'config_translation_edit_form'; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function buildForm(array $form, FormStateInterface $form_state, RouteMatchInterface $route_match = NULL, $plugin_id = NULL, $langcode = NULL) { | |
$form = parent::buildForm($form, $form_state, $route_match, $plugin_id, $langcode); | |
$form['#title'] = $this->t('Edit @language translation for %label', array( | |
'%label' => $this->mapper->getTitle(), | |
'@language' => $this->language->getName(), | |
)); | |
return $form; | |
} | |
/** | |
* {@inheritdoc} | |
*/ | |
public function submitForm(array &$form, FormStateInterface $form_state) { | |
parent::submitForm($form, $form_state); | |
drupal_set_message($this->t('Successfully updated @language translation.', array('@language' => $this->language->getName()))); | |
} | |
} |