You are here

interface FieldValidationRuleInterface in Field Validation 8

Defines the interface for Field Validation.

Hierarchy

Expanded class hierarchy of FieldValidationRuleInterface

All classes that implement FieldValidationRuleInterface

See also

\Drupal\field_validation\Annotation\FieldValidationRule

\Drupal\field_validation\FieldValidationRuleBase

\Drupal\field_validation\ConfigurableFieldValidationRuleInterface

\Drupal\field_validation\ConfigurableFieldValidationRuleBase

\Drupal\field_validation\FieldValidationRuleManager

Plugin API

2 files declare their use of FieldValidationRuleInterface
FieldValidationRuleSet.php in src/Entity/FieldValidationRuleSet.php
FieldValidationRuleSetInterface.php in src/FieldValidationRuleSetInterface.php

File

src/FieldValidationRuleInterface.php, line 20

Namespace

Drupal\field_validation
View source
interface FieldValidationRuleInterface extends PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface {

  /**
   * Applies a field_validation_rule to the field_validation_rule_set.
   *
   * @param \Drupal\field_validation\FieldValidationRuleSetInterface $field_validation_rule_set
   *   An field_validation_rule_set object.
   *
   * @return bool
   *   TRUE on success. FALSE if unable to add the field_validation_rule to the field_validation_rule_set.
   */
  public function addFieldValidationRule(FieldValidationRuleSetInterface $field_validation_rule_set);

  /**
   * Returns the extension the derivative would have have after adding this
   * field_validation_rule.
   *
   * @param string $extension
   *   The field_validation_rule extension the derivative has before adding.
   *
   * @return string
   *   The field_validation_rule extension after adding.
   */
  public function getDerivativeExtension($extension);

  /**
   * Returns a render array summarizing the configuration of the field_validation_rule.
   *
   * @return array
   *   A render array.
   */
  public function getSummary();

  /**
   * Returns the field_validation_rule label.
   *
   * @return string
   *   The field_validation_rule label.
   */
  public function label();

  /**
   * Returns the unique ID representing the field_validation_rule.
   *
   * @return string
   *   The field_validation_rule ID.
   */
  public function getUuid();

  /**
   * Returns the weight of the field_validation_rule.
   *
   * @return int|string
   *   Either the integer weight of the field_validation_rule, or an empty string.
   */
  public function getWeight();

  /**
   * Sets the weight for this field_validation_rule.
   *
   * @param int $weight
   *   The weight for this field_validation_rule.
   *
   * @return $this
   */
  public function setWeight($weight);

  /**
   * Returns the title of the field_validation_rule.
   *
   * @return string
   *   Either the string of the field_validation_rule.
   */
  public function getTitle();

  /**
   * Sets the title for this field_validation_rule.
   *
   * @param int $title
   *   The title for this field_validation_rule.
   *
   * @return $this
   */
  public function setTitle($title);

  /**
   * Returns the field name of the field_validation_rule.
   *
   * @return string
   *   The field name of the field_validation_rule.
   */
  public function getFieldName();

  /**
   * Sets the field name for this field_validation_rule.
   *
   * @param int $field_name
   *   The field name for this field_validation_rule.
   *
   * @return $this
   */
  public function setFieldName($field_name);

  /**
   * Returns the column of the field_validation_rule.
   *
   * @return string
   *   The column of the field_validation_rule.
   */
  public function getColumn();

  /**
   * Sets the column for this field_validation_rule.
   *
   * @param int $column
   *   The column for this field_validation_rule.
   *
   * @return $this
   */
  public function setColumn($column);

  /**
   * Returns the error message of the field_validation_rule.
   *
   * @return string
   *   The error message of the field_validation_rule.
   */
  public function getErrorMessage();

  /**
   * Sets the error_message for this field_validation_rule.
   *
   * @param int $error_message
   *   The error message for this field_validation_rule.
   *
   * @return $this
   */
  public function setErrorMessage($error_message);
  public function validate($params);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
FieldValidationRuleInterface::addFieldValidationRule public function Applies a field_validation_rule to the field_validation_rule_set. 14
FieldValidationRuleInterface::getColumn public function Returns the column of the field_validation_rule. 1
FieldValidationRuleInterface::getDerivativeExtension public function Returns the extension the derivative would have have after adding this field_validation_rule. 1
FieldValidationRuleInterface::getErrorMessage public function Returns the error message of the field_validation_rule. 1
FieldValidationRuleInterface::getFieldName public function Returns the field name of the field_validation_rule. 1
FieldValidationRuleInterface::getSummary public function Returns a render array summarizing the configuration of the field_validation_rule. 1
FieldValidationRuleInterface::getTitle public function Returns the title of the field_validation_rule. 1
FieldValidationRuleInterface::getUuid public function Returns the unique ID representing the field_validation_rule. 1
FieldValidationRuleInterface::getWeight public function Returns the weight of the field_validation_rule. 1
FieldValidationRuleInterface::label public function Returns the field_validation_rule label. 1
FieldValidationRuleInterface::setColumn public function Sets the column for this field_validation_rule. 1
FieldValidationRuleInterface::setErrorMessage public function Sets the error_message for this field_validation_rule. 1
FieldValidationRuleInterface::setFieldName public function Sets the field name for this field_validation_rule. 1
FieldValidationRuleInterface::setTitle public function Sets the title for this field_validation_rule. 1
FieldValidationRuleInterface::setWeight public function Sets the weight for this field_validation_rule. 1
FieldValidationRuleInterface::validate public function 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2