getMessageParameters() public method

Returns a list of tokens that will be injected into the message before it is returned from getMessage
Since: 2.0
public getMessageParameters ( ) : string[]
return string[]
Beispiel #1
0
 /**
  * Gets a Rule's message and processes that with various tokens
  *
  * @param FieldInterface $field
  * @param RuleInterface  $rule
  *
  * @return string
  */
 protected function buildMessage(FieldInterface $field, RuleInterface $rule, $value)
 {
     // Build an array with all the token values
     $tokens = array('name' => $field->getName(), 'label' => $field->getLabel(), 'value' => $value) + $rule->getMessageParameters();
     return $this->processMessageTokens($tokens, $rule->getMessage());
 }