protected function _getHtmlAttributes() { $attributes = []; $attributes['type'] = 'hidden'; $attributes['value'] = Ajde_Component_String::escape($this->getValue()); return $attributes; }
protected function _getHtmlAttributes() { $attributes = ''; $attributes .= ' type="hidden" '; $attributes .= ' value="' . Ajde_Component_String::escape($this->getValue()) . '" '; return $attributes; }
protected function _getHtmlAttributes() { $attributes = ''; $attributes .= ' type="text" '; $attributes .= ' value="' . Ajde_Component_String::escape($this->getValue()) . '" '; if ($this->hasReadonly() && $this->getReadonly() === true) { $attributes .= ' readonly="readonly" '; } return $attributes; }
protected function _getHtmlAttributes() { $attributes = []; $attributes['type'] = 'hidden'; $attributes['value'] = Ajde_Component_String::escape($this->getValue()); if ($this->hasReadonly() && $this->getReadonly() === true) { $attributes['readonly'] = 'readonly'; } return $attributes; }
protected function _getHtmlAttributes() { $attributes = []; $attributes['type'] = 'hidden'; if ($this->getMode() === self::MODE_NEW) { $attributes['value'] = $this->getDefault(); } else { $attributes['value'] = Ajde_Component_String::escape($this->getValue()); } return $attributes; }
protected function _getHtmlAttributes() { $attributes = ''; $attributes .= ' type="number" '; $attributes .= ' step="any" '; $attributes .= ' value="' . Ajde_Component_String::escape($this->getValue()) . '" '; $attributes .= ' maxlength="' . $this->getLength() . '" '; if ($this->getIsAutoIncrement() === true) { $attributes .= ' readonly="readonly" '; } return $attributes; }
protected function _getHtmlAttributes() { $attributes = []; $attributes['type'] = 'number'; $attributes['step'] = 'any'; $attributes['value'] = Ajde_Component_String::escape($this->getValue()); $attributes['maxlength'] = $this->getLength(); if ($this->getIsAutoIncrement() === true || $this->hasReadonly() && $this->getReadonly() === true) { $attributes['readonly'] = 'readonly'; } return $attributes; }
protected function _getHtmlAttributes() { $attributes = []; $attributes['type'] = 'time'; if ($this->getValue()) { $attributes['value'] = Ajde_Component_String::escape(date('H:i', strtotime($this->getValue()))); } else { $attributes['value'] = ''; } if ($this->hasReadonly() && $this->getReadonly() === true) { $attributes['readonly'] = 'readonly'; } return $attributes; }
protected function _getHtmlAttributes() { $attributes = []; $attributes['type'] = 'text'; $attributes['value'] = Ajde_Component_String::escape($this->getValue()); $attributes['maxlength'] = Ajde_Component_String::escape($this->getLength()); if ($this->hasReadonly() && $this->getReadonly() === true) { $attributes['readonly'] = 'readonly'; } if ($this->hasEmphasis() && $this->getEmphasis() === true) { $attributes['class'] = 'emphasis'; } if ($this->hasPlaceholder()) { $attributes['placeholder'] = $this->getPlaceholder(); } return $attributes; }
public function getParam($key, $default = null, $type = self::TYPE_STRING, $post = false) { $data = $this->_data; if ($post === true) { $data = $this->getPostData(); } if (isset($data[$key])) { switch ($type) { case self::TYPE_HTML: if ($this->autoCleanHtml() === true) { return Ajde_Component_String::clean($data[$key]); } else { return $data[$key]; } break; case self::TYPE_INTEGER: return (int) $data[$key]; break; case self::TYPE_FLOAT: return (double) $data[$key]; break; case self::TYPE_RAW: return $data[$key]; break; case self::TYPE_STRING: default: if ($this->autoEscapeString() === true) { if (is_array($data[$key])) { array_walk($data[$key], ['Ajde_Component_String', 'escape']); return $data[$key]; } else { return Ajde_Component_String::escape($data[$key]); } } else { return $data[$key]; } } } else { if (isset($default)) { return $default; } else { // TODO: throw new Ajde_Exception("Parameter '{$key}' not present in request and no default value given"); } } }
function _e($var) { return Ajde_Component_String::escape($var); }