You are here

protected function FieldValidationRuleEditForm::prepareFieldValidationRule in Field Validation 8

Converts a field_validation_rule ID into an object.

Parameters

string $field_validation_rule: The field_validation_rule ID.

Return value

\Drupal\field_validation\FieldValidationRuleInterface The field_validation_rule object.

Overrides FieldValidationRuleFormBase::prepareFieldValidationRule

File

src/Form/FieldValidationRuleEditForm.php, line 28

Class

FieldValidationRuleEditForm
Provides an edit form for fieldValidationRule.

Namespace

Drupal\field_validation\Form

Code

protected function prepareFieldValidationRule($field_validation_rule) {
  return $this->fieldValidationRuleSet
    ->getFieldValidationRule($field_validation_rule);
}