示例#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());
 }
示例#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;
 }
示例#3
0
 public function renderFormElement(\SlimForm\Element\Element $form)
 {
     return $form->render();
 }