Пример #1
0
 function testGetHtmlEscapesValueAttributeValue()
 {
     $field = new StringField('company_name');
     $field->setValue('H&M');
     $html = $field->getHtml();
     $this->assertContains('value="H&M"', $html);
 }
Пример #2
0
 /**
  * Process the request, get the field value
  * @return null
  */
 public function processRequest()
 {
     parent::processRequest();
     if ($this->value && !String::looksLikeUrl($this->value)) {
         $this->value = 'http://' . $this->value;
     }
 }