function visitCheckbox(\cmu\html\form\products\Input $component)
 {
     $html = "<span ";
     $html .= $component->getHtmlClass();
     $html .= ">";
     $html .= $component->getCheckedValue();
     $html .= "</span>";
     return $html;
 }
示例#2
0
 protected function accept(\cmu\html\form\visitors\input\AbstractInputVisitor $visitor, \cmu\html\form\products\Input $component)
 {
     //get TYPE converted to upper case
     $type = ucfirst($component->getType());
     //build method   visit + type (from above)
     $method = "visit" . $type;
     //return the values from the new object function
     return $visitor->{$method}($component);
 }
示例#3
0
 function visitInput(\cmu\html\form\products\Input $component)
 {
     $html = "<input ";
     $html .= $component->getAttributes();
     $html .= ">";
     $html .= "</input>";
     $html .= $component->getCaption();
     //labels for RADIO and CHECKBOX
     $html .= $component->returnHint();
     $html .= $component->returnErrorMessage();
     return $html;
 }
示例#4
0
 function visitInput(\cmu\html\form\products\Input $component)
 {
     //if we have a value , type is TEXT and sanitize is set
     //we can only validate TEXT input
     if ($component->getType() == "text" && null !== $component->getSanitize() && null != $component->getValue()) {
         $sanitize = new \cmu\html\form\sanitize\SanitizeContext($component->getSanitize());
         $component->setValue($sanitize->sanitizeText($component->getValue()));
     }
 }
 function visitPassword(\cmu\html\form\products\Input $component)
 {
     return $this->returnKeyValue($component->getValue(), $component->getName(), $component->getValue());
 }
示例#6
0
 function visitPassword(\cmu\html\form\products\Input $component)
 {
     if (null != $component->getValue()) {
         return true;
     }
 }