public function FileInlineEditForm::form in File Entity (fieldable files) 8.2
Gets the actual form array to be built.
Overrides FileEditForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
Form/ FileInlineEditForm.php, line 17
Class
- FileInlineEditForm
- Form class for inline edit form.
Namespace
Drupal\file_entity\FormCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
// Point form submissions to the Ajax controller.
$form['#action'] = '/file/' . $this
->getEntity()
->id() . '/inline-edit';
return $form;
}