public function FieldValidationRuleEditForm::buildForm in Field Validation 8
Parameters
\Drupal\field_validation\FieldValidationRuleSetInterface $field_validation_rule_set: The field_validation_rule_set.
string $field_validation_rule: The field_validation_rule ID.
Return value
array The form structure.
Throws
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException
Overrides FieldValidationRuleFormBase::buildForm
File
- src/
Form/ FieldValidationRuleEditForm.php, line 16
Class
- FieldValidationRuleEditForm
- Provides an edit form for fieldValidationRule.
Namespace
Drupal\field_validation\FormCode
public function buildForm(array $form, FormStateInterface $form_state, FieldValidationRuleSetInterface $field_validation_rule_set = NULL, $field_validation_rule = NULL, $field_name = '') {
$form = parent::buildForm($form, $form_state, $field_validation_rule_set, $field_validation_rule);
$form['#title'] = $this
->t('Edit %label rule', [
'%label' => $this->fieldValidationRule
->label(),
]);
$form['actions']['submit']['#value'] = $this
->t('Update rule');
return $form;
}