TYPO3 CMS  TYPO3_6-2
IdAttribute.php
Go to the documentation of this file.
1 <?php
3 
23 
34  public function getValue() {
35  $value = (string) $this->value;
36  if ($this->elementClassName === 'TYPO3\\CMS\\Form\\Domain\\Model\\Form') {
37  if (empty($value)) {
38  $value = 'form-' . $GLOBALS['TSFE']->id;
39  }
40  } elseif (empty($value)) {
42  if (is_integer($value)) {
43  $value = 'field-' . $value;
44  }
45  }
46  // Change spaces into hyphens
47  $attribute = preg_replace('/\\s/', '-', $value);
48  // Change first non-letter to field-
49  if (preg_match('/^([^a-zA-Z]{1})/', $attribute)) {
50  $attribute = 'field-' . $attribute;
51  }
52  // Remove non-word characters
53  $attribute = preg_replace('/([^a-zA-Z0-9_:\\-\\.]*)/', '', $attribute);
54  return $attribute;
55  }
56 
57 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]