public function DisplayErrorMessageOnForm::getSettingsForm in Business Rules 8
Same name and namespace in other branches
- 2.x src/Plugin/BusinessRulesAction/DisplayErrorMessageOnForm.php \Drupal\business_rules\Plugin\BusinessRulesAction\DisplayErrorMessageOnForm::getSettingsForm()
Return the form array.
@internal param array $form
Parameters
array $form: The form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state object.
\Drupal\business_rules\ItemInterface $item: The configured item.
Return value
array The render array for the settings form.
Overrides BusinessRulesItemPluginBase::getSettingsForm
File
- src/
Plugin/ BusinessRulesAction/ DisplayErrorMessageOnForm.php, line 34
Class
- DisplayErrorMessageOnForm
- Class ValidateFormField.
Namespace
Drupal\business_rules\Plugin\BusinessRulesActionCode
public function getSettingsForm(array &$form, FormStateInterface $form_state, ItemInterface $item) {
$settings['message'] = [
'#type' => 'textarea',
'#title' => t('Message'),
'#description' => t('To use variables on the message, just type the variable machine name as {{variable_id}}.'),
'#required' => TRUE,
'#default_value' => $item
->getSettings('message'),
];
return $settings;
}