/** * Return a parameter * * @param string $strKey The parameter key * * @return mixed The parameter value */ public function __get($strKey) { if ($strKey == 'options') { return $this->arrOptions; } return parent::__get($strKey); }
/** * Return an object property * * @param string $strKey The property name * * @return string The property value */ public function __get($strKey) { switch ($strKey) { case 'required': case 'mandatory': return false; } return parent::__get($strKey); }
/** * Return a parameter * @return string * @throws Exception */ public function __get($strKey) { switch ($strKey) { case 'options': return $this->arrOptions; break; default: return parent::__get($strKey); break; } }
/** * Return a parameter * * @param string $strKey The parameter key * * @return mixed The parameter value */ public function __get($strKey) { switch ($strKey) { case 'value': // Hide the Punycode format (see #2750) if ($this->rgxp == 'email' || $this->rgxp == 'friendly' || $this->rgxp == 'url') { return \Idna::decode($this->varValue); } else { return $this->varValue; } break; case 'type': if ($this->hideInput) { return 'password'; } // Use the HTML5 types (see #4138) but not the date, time and datetime types (see #5918) switch ($this->rgxp) { case 'digit': // Allow floats (see #7257) if (!isset($this->arrAttributes['step'])) { $this->addAttribute('step', 'any'); } // NO break; here // NO break; here case 'natural': return 'number'; break; case 'phone': return 'tel'; break; case 'email': return 'email'; break; case 'url': return 'url'; break; } return 'text'; break; default: return parent::__get($strKey); break; } }
/** * Return a parameter * * @param string $strKey The parameter key * * @return mixed The parameter value */ public function __get($strKey) { switch ($strKey) { case 'cols': return $this->intCols; break; case 'rows': return $this->intRows; break; case 'value': return specialchars(str_replace('\\n', "\n", $this->varValue)); break; default: return parent::__get($strKey); break; } }
/** * Return an object property * * @param string $strKey * * @return mixed */ public function __get($strKey) { if (isset($this->arrData[$strKey])) { return $this->arrData[$strKey]; } return parent::__get($strKey); }
/** * Return a parameter * * @param string $strKey The parameter key * * @return mixed The parameter value */ public function __get($strKey) { switch ($strKey) { case 'name': return $this->strCaptchaKey; break; case 'question': return $this->strQuestion; break; default: return parent::__get($strKey); break; } }
public function __get($strKey) { switch ($strKey) { case 'value': /** * reformat array if we have only one field * from array[]['fieldname'] = value * to array[] = value * so we have the same behavoir like multiple-checkbox fields */ if ($this->flatArray) { $arrNew = array(); foreach ($this->varValue as $val) { $arrNew[] = $val[key($this->columnFields)]; } return $arrNew; } else { return parent::__get($strKey); } break; default: return parent::__get($strKey); break; } }
/** * Return a parameter * * @return string $strKey */ public function __get($strKey) { switch ($strKey) { case 'currentRecord': return \Input::get('id'); case 'params': return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['params']; case 'foreignTable': return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignTable']; case 'foreignField': $foreignField = $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignField']; if (empty($foreignField)) { $foreignField = 'pid'; } return $foreignField; case 'foreignTableCallback': return $GLOBALS['TL_DCA'][$this->strTable]['fields'][$this->strField]['foreignTableCallback']; default: return parent::__get($strKey); } }
/** * Return a parameter * * @param string $strKey The parameter key * * @return mixed The parameter value */ public function __get($strKey) { switch ($strKey) { case 'value': if (is_array($this->varValue)) { return array($this->varValue[0], \Idna::decode($this->varValue[1])); } else { return array('', \Idna::decode($this->varValue)); } break; case 'type': return 'text'; break; default: return parent::__get($strKey); break; } }
/** * Return an object property. * * Supported keys: * * * sourceName: the name of the data container for the item elements. * * fieldType : the input type. Either "radio" or "checkbox". * * titleIcon: the icon to use in the title section. * * mandatory: the field value must not be empty. * * @param string $strKey The property name. * * @return string The property value. */ public function __get($strKey) { switch ($strKey) { case 'sourceName': return $this->sourceName; case 'fieldType': return $this->fieldType; case 'titleIcon': return $this->titleIcon; case 'mandatory': return $this->arrConfiguration['mandatory']; case 'orderField': return $this->orderField; default: } return parent::__get($strKey); }