public function MessageFormController::actions

Overrides Drupal\Core\Entity\EntityFormController::actions().

Overrides EntityFormController::actions

File

drupal/core/modules/contact/lib/Drupal/contact/MessageFormController.php, line 110
Definition of Drupal\contact\MessageFormController.

Class

MessageFormController
Form controller for contact message forms.

Namespace

Drupal\contact

Code

public function actions(array $form, array &$form_state) {
  $elements = parent::actions($form, $form_state);
  $elements['submit']['#value'] = t('Send message');
  $elements['delete']['#access'] = FALSE;
  $elements['preview'] = array(
    '#value' => t('Preview'),
    '#validate' => array(
      array(
        $this,
        'validate',
      ),
    ),
    '#submit' => array(
      array(
        $this,
        'submit',
      ),
      array(
        $this,
        'preview',
      ),
    ),
  );
  return $elements;
}