core-bundle/src/Resources/contao/classes/DataContainer.php
public function initPicker(PickerInterface $picker)
	{
		if (!empty($_GET['act']))
		{
			return null;
		}

		$provider = $picker->getCurrentProvider();

		if (!$provider instanceof DcaPickerProviderInterface || $provider->getDcaTable() != $this->strTable)
		{
			return null;
		}

		$attributes = $provider->getDcaAttributes($picker->getConfig());

		$this->objPicker = $picker;
		$this->strPickerFieldType = $attributes['fieldType'];

		$this->objPickerCallback = function ($value) use ($picker, $provider)
		{
			return $provider->convertDcaValue($picker->getConfig(), $value);
		};

		if (isset($attributes['value']))
		{
			$this->arrPickerValue = (array) $attributes['value'];
		}

		return $attributes;
	}
public function initPicker(PickerInterface $picker)
	{
		if (!empty($_GET['act']))
		{
			return null;
		}

		$provider = $picker->getCurrentProvider();

		if (!$provider instanceof DcaPickerProviderInterface || $provider->getDcaTable() != $this->strTable)
		{
			return null;
		}

		$attributes = $provider->getDcaAttributes($picker->getConfig());

		$this->objPicker = $picker;
		$this->strPickerFieldType = $attributes['fieldType'];

		$this->objPickerCallback = function ($value) use ($picker, $provider)
		{
			return $provider->convertDcaValue($picker->getConfig(), $value);
		};

		if (isset($attributes['value']))
		{
			$this->arrPickerValue = (array) $attributes['value'];
		}

		return $attributes;
	}
public function initPicker ( PickerInterface $ picker ) { if ( ! empty ( $ _GET [ 'act' ] ) ) { return null ; } $ provider = $ picker -> getCurrentProvider ( ) ; if ( ! $ provider instanceof DcaPickerProviderInterface || $ provider -> getDcaTable ( ) != $ this -> strTable ) { return null ; } $ attributes = $ provider -> getDcaAttributes ( $ picker -> getConfig ( ) ) ; $ this -> objPicker = $ picker ; $ this -> strPickerFieldType = $ attributes [ 'fieldType' ] ; $ this -> objPickerCallback = function ( $ value ) use ( $ picker , $ provider ) { return $ provider -> convertDcaValue ( $ picker -> getConfig ( ) , $ value ) ; } ; if ( isset ( $ attributes [ 'value' ] ) ) { $ this -> arrPickerValue = ( array ) $ attributes [ 'value' ] ; } return $ attributes ; }
Initialize the picker

@param PickerInterface $picker

@return array|null
Initialize the picker