3 namespace Drupal\Core\Render\Element;
6 * Provides a form submit button.
8 * Submit buttons are processed the same as regular buttons, except they trigger
9 * the form's submit handler.
12 * - #submit: Specifies an alternate callback for form submission when the
13 * submit button is pressed. Use '::methodName' format or an array containing
14 * the object and method name (for example, [ $this, 'methodName'] ).
15 * - #value: The text to be shown on the button.
19 * $form['actions']['submit'] = array(
20 * '#type' => 'submit',
21 * '#value' => $this->t('Save'),
25 * @see \Drupal\Core\Render\Element\Button
27 * @FormElement("submit")
29 class Submit extends Button {
34 public function getInfo() {
36 '#executes_submit_callback' => TRUE,
37 ] + parent::getInfo();