You are here

protected function LingotekSettingsTabContentForm::generateFieldsForm in Lingotek Translation 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  2. 4.0.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  3. 3.1.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  4. 3.2.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  5. 3.3.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  6. 3.4.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  7. 3.5.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  8. 3.6.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  9. 3.7.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()
  10. 3.8.x src/Form/LingotekSettingsTabContentForm.php \Drupal\lingotek\Form\LingotekSettingsTabContentForm::generateFieldsForm()

Parameters

$entity_id:

$bundle_id:

$row:

Return value

mixed

2 calls to LingotekSettingsTabContentForm::generateFieldsForm()
LingotekSettingsTabContentForm::ajaxRefreshEntityFieldsForm in src/Form/LingotekSettingsTabContentForm.php
LingotekSettingsTabContentForm::buildForm in src/Form/LingotekSettingsTabContentForm.php
Form constructor.

File

src/Form/LingotekSettingsTabContentForm.php, line 476

Class

LingotekSettingsTabContentForm
Configure Lingotek

Namespace

Drupal\lingotek\Form

Code

protected function generateFieldsForm(FormStateInterface $form_state, $entity_type_id, $bundle_id) {
  $readOnly = FALSE;
  if ($this->countTranslatableBundles > self::CONTENT_SINGLE_FORM_THRESHOLD) {
    $readOnly = TRUE;
  }
  $fields_container = [
    '#type' => 'container',
    '#id' => 'container-' . str_replace('_', '-', $entity_type_id) . '-' . str_replace('_', '-', $bundle_id) . ($readOnly ? '-readonly' : ''),
    '#attributes' => [
      'id' => 'container-' . str_replace('_', '-', $entity_type_id) . '-' . str_replace('_', '-', $bundle_id) . ($readOnly ? '-readonly' : ''),
    ],
    'fields' => $this
      ->retrieveFields($form_state, $entity_type_id, $bundle_id, $readOnly),
  ];
  return $fields_container;
}