public function ScheduledUpdateForm::buildForm in Scheduled Updates 8
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
- src/
Entity/ Form/ ScheduledUpdateForm.php, line 23 - Contains \Drupal\scheduled_updates\Entity\Form\ScheduledUpdateForm.
Class
- ScheduledUpdateForm
- Form controller for Scheduled update edit forms.
Namespace
Drupal\scheduled_updates\Entity\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
/* @var $entity \Drupal\scheduled_updates\Entity\ScheduledUpdate */
$form = parent::buildForm($form, $form_state);
$entity = $this->entity;
$form['langcode'] = array(
'#title' => $this
->t('Language'),
'#type' => 'language_select',
'#default_value' => $entity->langcode->value,
'#languages' => Language::STATE_ALL,
);
return $form;
}