public function saveCallback($value, $dc)
	{
		if (strpos($dc->field, '__rsce_dummy__') !== false) {
			return;
		}

		if (
			$GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fileTree'
			|| $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fineUploader'
		) {
			$value = $this->uuidBinToText($value);
		}

		$field = preg_split('(__([0-9]+)__)', substr($dc->field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);

		$data =& $this->saveData[$field[0]];

		for ($i = 0; isset($field[$i]); $i += 2) {

			if (isset($field[$i + 1])) {
				if (!isset($data[$field[$i + 1]])) {
					$data[$field[$i + 1]] = array();
				}
				if (!isset($data[$field[$i + 1]][$field[$i + 2]])) {
					if ($field[$i + 2] === 'rsce_empty' && !isset($field[$i + 3]) && !$value) {
						// do not save the empty field
						break;
					}
					$data[$field[$i + 1]][$field[$i + 2]] = array();
				}
				$data =& $data[$field[$i + 1]][$field[$i + 2]];
			}
			else {
				$data = $value;
			}
		}
	}
public function saveCallback($value, $dc)
	{
		if (strpos($dc->field, '__rsce_dummy__') !== false) {
			return;
		}

		if (
			$GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fileTree'
			|| $GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['inputType'] === 'fineUploader'
		) {
			$value = $this->uuidBinToText($value);
		}

		$field = preg_split('(__([0-9]+)__)', substr($dc->field, 11), -1, PREG_SPLIT_DELIM_CAPTURE);

		$data =& $this->saveData[$field[0]];

		for ($i = 0; isset($field[$i]); $i += 2) {

			if (isset($field[$i + 1])) {
				if (!isset($data[$field[$i + 1]])) {
					$data[$field[$i + 1]] = array();
				}
				if (!isset($data[$field[$i + 1]][$field[$i + 2]])) {
					if ($field[$i + 2] === 'rsce_empty' && !isset($field[$i + 3]) && !$value) {
						// do not save the empty field
						break;
					}
					$data[$field[$i + 1]][$field[$i + 2]] = array();
				}
				$data =& $data[$field[$i + 1]][$field[$i + 2]];
			}
			else {
				$data = $value;
			}
		}
	}
public function saveCallback ( $ value , $ dc ) { if ( strpos ( $ dc -> field , '__rsce_dummy__' ) !== false ) { return ; } if ( $ GLOBALS [ 'TL_DCA' ] [ $ dc -> table ] [ 'fields' ] [ $ dc -> field ] [ 'inputType' ] === 'fileTree' || $ GLOBALS [ 'TL_DCA' ] [ $ dc -> table ] [ 'fields' ] [ $ dc -> field ] [ 'inputType' ] === 'fineUploader' ) { $ value = $ this -> uuidBinToText ( $ value ) ; } $ field = preg_split ( '(__([0-9]+)__)' , substr ( $ dc -> field , 11 ) , - 1 , PREG_SPLIT_DELIM_CAPTURE ) ; $ data = & $ this -> saveData [ $ field [ 0 ] ] ; for ( $ i = 0 ; isset ( $ field [ $ i ] ) ; $ i += 2 ) { if ( isset ( $ field [ $ i + 1 ] ) ) { if ( ! isset ( $ data [ $ field [ $ i + 1 ] ] ) ) { $ data [ $ field [ $ i + 1 ] ] = array ( ) ; } if ( ! isset ( $ data [ $ field [ $ i + 1 ] ] [ $ field [ $ i + 2 ] ] ) ) { if ( $ field [ $ i + 2 ] === 'rsce_empty' && ! isset ( $ field [ $ i + 3 ] ) && ! $ value ) { // do not save the empty field break ; } $ data [ $ field [ $ i + 1 ] ] [ $ field [ $ i + 2 ] ] = array ( ) ; } $ data = & $ data [ $ field [ $ i + 1 ] ] [ $ field [ $ i + 2 ] ] ; } else { $ data = $ value ; } } }
Field save callback

Saves the field data to $this->saveData

@param  string         $value Field value
@param  \DataContainer $dc    Data container
@return void
Field save callback