public function ServiceResourceBaseForm::buildForm in Services 9.0.x
Same name and namespace in other branches
- 8.4 src/Form/ServiceResourceBaseForm.php \Drupal\services\Form\ServiceResourceBaseForm::buildForm()
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/
Form/ ServiceResourceBaseForm.php, line 17
Class
Namespace
Drupal\services\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $service_endpoint = NULL, $plugin_id = NULL) {
$form = parent::buildForm($form, $form_state);
$form['service_plugin_id'] = [
'#type' => 'value',
'#value' => $plugin_id,
];
$form['service_endpoint_id'] = [
'#type' => 'value',
'#value' => $service_endpoint
->id(),
];
return $form;
}