EntityConfirmFormBase::actions

protected EntityConfirmFormBase::actions(array $form, FormStateInterface $form_state)

Returns an array of supported actions for the current entity form.

@todo Consider introducing a 'preview' action here, since it is used by many entity types.

Overrides EntityForm::actions

File

core/lib/Drupal/Core/Entity/EntityConfirmFormBase.php, line 73

Class

EntityConfirmFormBase
Provides a generic base class for an entity-based confirmation form.

Namespace

Drupal\Core\Entity

Code

protected function actions(array $form, FormStateInterface $form_state) {
  return array(
    'submit' => array(
      '#type' => 'submit',
      '#value' => $this->getConfirmText(),
      '#submit' => array(
        array($this, 'submitForm'),
      ),
    ),
    'cancel' => ConfirmFormHelper::buildCancelLink($this, $this->getRequest()),
  );
}
doc_Drupal
2016-10-29 09:04:43
Comments
Leave a Comment

Please login to continue.