You are here

public function FieldValidationRuleSet::getFieldValidationRules in Field Validation 8

Returns the field_validation_rules for this field_validation_rule_set.

Return value

\Drupal\field_validation\FieldValidationRulePluginCollection|\Drupal\field_validation\FieldValidationRuleInterface[] The FieldValidationRule plugin collection.

Overrides FieldValidationRuleSetInterface::getFieldValidationRules

1 call to FieldValidationRuleSet::getFieldValidationRules()
FieldValidationRuleSet::getPluginCollections in src/Entity/FieldValidationRuleSet.php
Gets the plugin collections used by this object.

File

src/Entity/FieldValidationRuleSet.php, line 146

Class

FieldValidationRuleSet
Defines a field validation rule set configuration entity.

Namespace

Drupal\field_validation\Entity

Code

public function getFieldValidationRules() {

  //drupal_set_message('getFieldValidationRules');
  if (!$this->fieldValidationRulesCollection) {
    $this->fieldValidationRulesCollection = new FieldValidationRulePluginCollection($this
      ->getFieldValidationRulePluginManager(), $this->field_validation_rules);
    $this->fieldValidationRulesCollection
      ->sort();

    //drupal_set_message(var_export($this->field_validation_rules, true));
  }
  return $this->fieldValidationRulesCollection;
}