Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 4 |
| Submit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
| getInfo | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
|||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\Core\Render\Element\Submit. | |
| */ | |
| namespace Drupal\Core\Render\Element; | |
| /** | |
| * Provides a form submit button. | |
| * | |
| * Submit buttons are processed the same as regular buttons, except they trigger | |
| * the form's submit handler. | |
| * | |
| * Properties: | |
| * - #submit: Specifies an alternate callback for form submission when the | |
| * submit button is pressed. Use '::methodName' format or an array containing | |
| * the object and method name (for example, [ $this, 'methodName'] ). | |
| * - #value: The text to be shown on the button. | |
| * | |
| * Usage Example: | |
| * @code | |
| * $form['actions']['submit'] = array( | |
| * '#type' => 'submit, | |
| * '#value' => $this->t('Save'), | |
| * ); | |
| * @endcode | |
| * | |
| * @see \Drupal\Core\Render\Element\Button | |
| * | |
| * @FormElement("submit") | |
| */ | |
| class Submit extends Button { | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getInfo() { | |
| return array( | |
| '#executes_submit_callback' => TRUE, | |
| ) + parent::getInfo(); | |
| } | |
| } |