public function TranslatorPluginUiBase::addConnectButton in Translation Management Tool 8
Adds a "Connect" button to a form.
Return value
array A form array containing "Connect" button.
File
- src/
TranslatorPluginUiBase.php, line 106
Class
- TranslatorPluginUiBase
- Default ui controller class for translator plugins.
Namespace
Drupal\tmgmtCode
public function addConnectButton() {
$form['connect'] = array(
'#type' => 'submit',
'#value' => t('Connect'),
'#submit' => [
[
TranslatorForm::class,
'updateRemoteLanguagesMappings',
],
[
$this,
'submitConnect',
],
],
'#limit_validation_errors' => array(
array(
'settings',
),
),
'#executes_submit_callback' => TRUE,
'#ajax' => [
'callback' => [
TranslatorForm::class,
'ajaxTranslatorPluginSelect',
],
'wrapper' => 'tmgmt-plugin-wrapper',
],
);
return $form;
}