Exemplo n.º 1
0
 public function getMessage()
 {
     $messages = $this->_getErrorMessages();
     if (empty($this->_errorCode) || !isset($messages[$this->_errorCode])) {
         return null;
     }
     return sprintf($messages[$this->_errorCode], $this->_element->getValue());
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 public function renderFormElement(\SlimForm\Element\Element $form)
 {
     return $form->render();
 }