Ejemplo n.º 1
0
 /**
  * Display the checkbox
  *
  * @return string The displayed HTML
  */
 public function display()
 {
     if ($this->value) {
         $this->checked = true;
     }
     return parent::display();
 }
Ejemplo n.º 2
0
 /**
  * Display the value of the input
  *
  * @return string The displayed HTML or text
  */
 public function display()
 {
     if ($this->plainText) {
         $this->value = nl2br($this->value);
     }
     return parent::display();
 }
Ejemplo n.º 3
0
 /**
  * Display the input
  *
  * @return string The HTML result to display
  */
 public function display()
 {
     if (empty($this->value)) {
         $this->value = "{}";
     } elseif (is_array($this->value)) {
         $this->value = json_encode($this->value, JSON_NUMERIC_CHECK | JSON_HEX_APOS | JSON_HEX_QUOT);
     }
     return parent::display();
 }
Ejemplo n.º 4
0
 /**
  * Display the input
  *
  * @return string The HTML result of displaying
  */
 public function display()
 {
     if (is_numeric($this->value)) {
         $this->timestamp = $this->value;
     } else {
         $this->timestamp = strtotime($this->value);
     }
     $this->value = $this->timestamp ? date(self::FORMAT, $this->timestamp) : '';
     return parent::display();
 }
Ejemplo n.º 5
0
 /**
  * Display the color input
  *
  * @return string the displayed HTML
  */
 public function display()
 {
     $this->type = "text";
     return parent::display();
 }
Ejemplo n.º 6
0
 /**
  * Display the file input
  *
  * @return string The displayed HTML
  */
 public function display()
 {
     $this->value = '';
     $this->attributes['e-value'] = 'value';
     return parent::display();
 }
Ejemplo n.º 7
0
 /**
  * Display the input
  *
  * @return string The HTML result to display
  */
 public function display()
 {
     $decrypt = $this->decrypt;
     $this->value = $this->get && $decrypt && is_callable($decrypt) ? $decrypt($this->value) : "";
     return parent::display();
 }