public function getMessage() { $messages = $this->_getErrorMessages(); if (empty($this->_errorCode) || !isset($messages[$this->_errorCode])) { return null; } return sprintf($messages[$this->_errorCode], $this->_element->getValue()); }
public function addErrorMessage(Element $element, $errorKey, $errorMessage) { $elementKey = $element->getName(); if (!isset($this->_messages[$elementKey])) { $this->_messages[$elementKey] = array(); } $this->_messages[$elementKey][$errorKey] = $errorMessage; return $this; }
public function renderFormElement(\SlimForm\Element\Element $form) { return $form->render(); }