public function onloadCallback($dc)
	{
		if (\Input::get('act') === 'create') {
			return;
		}

		if (\Input::get('act') === 'edit') {
			$this->reloadConfig();
		}

		if ($dc->table === 'tl_content' && class_exists('CeAccess')) {
			$ceAccess = new \CeAccess;
			$ceAccess->filterContentElements($dc);
		}

		if (\Input::get('act') === 'editAll') {
			return $this->createDcaMultiEdit($dc);
		}

		$type = $this->getDcaFieldValue($dc, 'type');
		if (!$type || substr($type, 0, 5) !== 'rsce_') {
			return;
		}

		$data = $this->getDcaFieldValue($dc, 'rsce_data', true);
		if ($data && substr($data, 0, 1) === '{') {
			$this->data = json_decode($data, true);
		}

		$createFromPost = \Input::post('FORM_SUBMIT') === $dc->table;
		$tmpField = null;

		if (\Input::get('field') && substr(\Input::get('field'), 0, 11) === 'rsce_field_') {
			// Ensures that the fileTree oder pageTree field exists
			$tmpField = \Input::get('field');
		}
		elseif (
			\Input::get('target')
			&& ($target = explode('.', \Input::get('target'), 3))
			&& $target[0] === $dc->table
			&& substr($target[1], 0, 11) === 'rsce_field_'
		) {
			// Ensures that the fileTree oder pageTree field exists
			$tmpField = $target[1];
		}
		elseif (\Input::post('name') && substr(\Input::post('name'), 0, 11) === 'rsce_field_') {
			// Ensures that the fileTree oder pageTree field exists
			$tmpField = \Input::post('name');
		}

		$this->createDca($dc, $type, $createFromPost, $tmpField);
	}
public function onloadCallback($dc)
	{
		if (\Input::get('act') === 'create') {
			return;
		}

		if (\Input::get('act') === 'edit') {
			$this->reloadConfig();
		}

		if ($dc->table === 'tl_content' && class_exists('CeAccess')) {
			$ceAccess = new \CeAccess;
			$ceAccess->filterContentElements($dc);
		}

		if (\Input::get('act') === 'editAll') {
			return $this->createDcaMultiEdit($dc);
		}

		$type = $this->getDcaFieldValue($dc, 'type');
		if (!$type || substr($type, 0, 5) !== 'rsce_') {
			return;
		}

		$data = $this->getDcaFieldValue($dc, 'rsce_data', true);
		if ($data && substr($data, 0, 1) === '{') {
			$this->data = json_decode($data, true);
		}

		$createFromPost = \Input::post('FORM_SUBMIT') === $dc->table;
		$tmpField = null;

		if (\Input::get('field') && substr(\Input::get('field'), 0, 11) === 'rsce_field_') {
			// Ensures that the fileTree oder pageTree field exists
			$tmpField = \Input::get('field');
		}
		elseif (
			\Input::get('target')
			&& ($target = explode('.', \Input::get('target'), 3))
			&& $target[0] === $dc->table
			&& substr($target[1], 0, 11) === 'rsce_field_'
		) {
			// Ensures that the fileTree oder pageTree field exists
			$tmpField = $target[1];
		}
		elseif (\Input::post('name') && substr(\Input::post('name'), 0, 11) === 'rsce_field_') {
			// Ensures that the fileTree oder pageTree field exists
			$tmpField = \Input::post('name');
		}

		$this->createDca($dc, $type, $createFromPost, $tmpField);
	}
public function onloadCallback ( $ dc ) { if ( \ Input :: get ( 'act' ) === 'create' ) { return ; } if ( \ Input :: get ( 'act' ) === 'edit' ) { $ this -> reloadConfig ( ) ; } if ( $ dc -> table === 'tl_content' && class_exists ( 'CeAccess' ) ) { $ ceAccess = new \ CeAccess ; $ ceAccess -> filterContentElements ( $ dc ) ; } if ( \ Input :: get ( 'act' ) === 'editAll' ) { return $ this -> createDcaMultiEdit ( $ dc ) ; } $ type = $ this -> getDcaFieldValue ( $ dc , 'type' ) ; if ( ! $ type || substr ( $ type , 0 , 5 ) !== 'rsce_' ) { return ; } $ data = $ this -> getDcaFieldValue ( $ dc , 'rsce_data' , true ) ; if ( $ data && substr ( $ data , 0 , 1 ) === '{' ) { $ this -> data = json_decode ( $ data , true ) ; } $ createFromPost = \ Input :: post ( 'FORM_SUBMIT' ) === $ dc -> table ; $ tmpField = null ; if ( \ Input :: get ( 'field' ) && substr ( \ Input :: get ( 'field' ) , 0 , 11 ) === 'rsce_field_' ) { // Ensures that the fileTree oder pageTree field exists $ tmpField = \ Input :: get ( 'field' ) ; } elseif ( \ Input :: get ( 'target' ) && ( $ target = explode ( '.' , \ Input :: get ( 'target' ) , 3 ) ) && $ target [ 0 ] === $ dc -> table && substr ( $ target [ 1 ] , 0 , 11 ) === 'rsce_field_' ) { // Ensures that the fileTree oder pageTree field exists $ tmpField = $ target [ 1 ] ; } elseif ( \ Input :: post ( 'name' ) && substr ( \ Input :: post ( 'name' ) , 0 , 11 ) === 'rsce_field_' ) { // Ensures that the fileTree oder pageTree field exists $ tmpField = \ Input :: post ( 'name' ) ; } $ this -> createDca ( $ dc , $ type , $ createFromPost , $ tmpField ) ; }
tl_content, tl_module and tl_form_field DCA onload callback

Reloads config and creates the DCA fields

@param  \DataContainer $dc Data container
@return void
tl_content tl_module and tl_form_field DCA onload callback