public function LingotekSettingsController::getProfileListForm in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 8 src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 8.2 src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 4.0.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.0.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.1.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.2.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.3.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.4.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.6.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.7.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
- 3.8.x src/Controller/LingotekSettingsController.php \Drupal\lingotek\Controller\LingotekSettingsController::getProfileListForm()
Gets the profile list form wrapped, so it can be expanded and collapsed.
Return value
array The form definition.
1 call to LingotekSettingsController::getProfileListForm()
- LingotekSettingsController::content in src/
Controller/ LingotekSettingsController.php
File
- src/
Controller/ LingotekSettingsController.php, line 44
Class
Namespace
Drupal\lingotek\ControllerCode
public function getProfileListForm() {
$original_form = $this->formBuilder
->getForm($this
->entityTypeManager()
->getListBuilder('lingotek_profile'), new FormState());
$form['profiles_wrapper'] = [
'#type' => 'details',
'#title' => $this
->t('Translation Profiles'),
];
$form['profiles_wrapper']['form'] = $original_form;
// We add the link manually, as we cannot use local actions for that.
$form['profiles_wrapper']['form']['add_link'] = [
'#type' => 'link',
'#title' => t('Add new Translation Profile'),
'#url' => Url::fromRoute('entity.lingotek_profile.add_form'),
'#weight' => 50,
'#ajax' => [
'class' => [
'use-ajax',
],
],
'#attributes' => [
'class' => [
'use-ajax',
],
'data-dialog-type' => 'modal',
'data-dialog-options' => Json::encode([
'width' => 860,
'height' => 530,
]),
],
];
return $form;
}