You are here

public function TranscodeJobForm::buildForm in Video 8.2

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides EntityForm::buildForm

File

modules/video_transcode/src/Form/TranscodeJobForm.php, line 19

Class

TranscodeJobForm
Form controller for the transcode job entity edit forms.

Namespace

Drupal\video_transcode\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {

  /* @var $entity \Drupal\video_transcode\Entity\TranscodeJob */
  $form = parent::buildForm($form, $form_state);
  $entity = $this->entity;
  $form['langcode'] = array(
    '#title' => $this
      ->t('Language'),
    '#type' => 'language_select',
    '#default_value' => $entity
      ->getUntranslated()
      ->language()
      ->getId(),
    '#languages' => Language::STATE_ALL,
  );
  return $form;
}