You are here

public function FieldValidationRuleSet::getFieldValidationRule in Field Validation 8

Returns a specific FieldValidationRule.

Parameters

string $field_validation_rule: The FieldValidationRule ID.

Return value

\Drupal\field_validation\FieldValidationRuleInterface The FieldValidationRule object.

Overrides FieldValidationRuleSetInterface::getFieldValidationRule

File

src/Entity/FieldValidationRuleSet.php, line 139

Class

FieldValidationRuleSet
Defines a field validation rule set configuration entity.

Namespace

Drupal\field_validation\Entity

Code

public function getFieldValidationRule($field_validation_rule) {
  return $this
    ->getFieldValidationRules()
    ->get($field_validation_rule);
}