public function MessageAction::form

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Return value

array The form structure.

Overrides ConfigurableActionInterface::form

File

drupal/core/modules/action/lib/Drupal/action/Plugin/Action/MessageAction.php, line 72
Contains \Drupal\action\Plugin\Action\MessageAction.

Class

MessageAction
Sends a message to the current user's screen.

Namespace

Drupal\action\Plugin\Action

Code

public function form(array $form, array &$form_state) {
  $form['message'] = array(
    '#type' => 'textarea',
    '#title' => t('Message'),
    '#default_value' => $this->configuration['message'],
    '#required' => TRUE,
    '#rows' => '8',
    '#description' => t('The message to be displayed to the current user. You may include placeholders like [node:title], [user:name], and [comment:body] to represent data that will be different each time message is sent. Not all placeholders will be available in all contexts.'),
  );
  return $form;
}