コード例 #1
0
ファイル: FormObject.php プロジェクト: laralite/form
 /**
  * Render the FormObject and set its id
  *
  * @return string
  */
 public function render()
 {
     // Set the proper ID according to the label
     $this->setId();
     // Encode HTML value
     $isButton = $this instanceof Field ? $this->isButton() : false;
     if (!$isButton and is_string($this->value)) {
         $this->value = Helpers::encode($this->value);
     }
     return parent::render();
 }
コード例 #2
0
ファイル: Hidden.php プロジェクト: laralite/form
 /**
  * Outputs a hidden field
  *
  * @return string An <input type="hidden" />
  */
 public function render()
 {
     return HtmlInput::create('hidden', $this->name, Helpers::encode($this->value), $this->attributes)->render();
 }